#137
php 發送郵件若成功,會回傳 1,表 true
$emailTo="";
$subject="";
$body="";
$headers="";
mail($emailTo, $subject, $body, $headers)
#143-145 天氣預報網站範例
擷取外部網頁特定部分資料
background-position: center;
background-size: cover;
<?php
$city= $_GET['city'];
$city= str_replace(" ", "", $city); // 空格替換成沒有空格,從$city取出替換
$content= file_get_contents("http://www.weather-forecast.com/locations/San-Francisco/forcasts/latest");
preg_match("/3 Day Weather Forecast Summary:/i", $content, $matches);
print_r($matches)
?>
沒有留言:
張貼留言