Ben php için yeni ve herhangi bir şehir için "http://www.weather-forecast.com" hava durumu bilgilerini alabilirsiniz bir scraper.php sayfası yaptık.
Ben eğitmen takip ediyordu ve onun sadece kısa bir 3 günlükkazıyıcı php boş bir sayfa döndürüyor
forcast dönmek gerekiyordu benim kod boş sayfası döndürüyor neden göremiyorum ... Burada
<?php
$city=$_GET['city'];
$city=str_replace(" ","",$city);
$contents=file_get_contents("http://www.weather-forecast.com/locations/".$city."/forecasts/latest");
preg_match('/3 Day Weather Forest Summary:<\/b>
<span class="phrase">(.*?)</span>',$contents, $matches);
echo $matches[1];
?>
Hata ayıklamayı denediniz mi? $ şehir nedir? $ içeriği ne alırsın? – pvg
blank, sözdizimi hataları anlamına gelebilir http://php.net/manual/en/function.error-reporting.php –