<?php
function tutgetir($adres){
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $adres);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.google.com");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7');
$veri= curl_exec($ch);
curl_close($ch);
return $veri;
}
$adres="https://www.r10.net/php/73449-php-eksin.html";
$cikti2=@tutgetir($adres.($cikti[0]));
$cikti2=explode ('<title>', $cikti2);
$cikti2=explode ('</title>', $cikti2[1]);
//mysql_query("Insert Into post (Title) values ('$cikti2[0]')");
echo $cikti2[0];
?>Bu işini görür, server'da curl fonksiyonu açık olması lazım yoksa hata verir.