Merhabalar hocalarım
http://malatyanobetcieczane.com/ için bot yapmaya çalışıyorum Kodları aşağıda veriyorum fakat bir problem var siteyi komple çekiyor font tagını çekmeye çalışıyorum bu seferde hata veriyor çektiğim site ise
http://www.malatyaeczaciodasi.org.tr/nobetci_eczaneler.php?tarih=2017-10-01
$tarih = date("Y-m-d");
function curl($url)
{
$user_agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt ($ch, CURLOPT_REFERER, $url);
$icerik = curl_exec($ch);
curl_close($ch);
return $icerik;
}
$html = curl('http://www.malatyaeczaciodasi.org.tr/nobetci_eczaneler.php?tarih='.$tarih.'&get_param=');
$icerik = file_get_contents($link);
echo "$html"
?>