<?
function site_kaynak($url) {
if (function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
return curl_exec($ch);
} else {
return file_get_contents($url);
}
}
?>bu kodu ekle sayfana sonrasında file_get_contents yazdığın yere site_kaynak yaz
ör:
file_get_contents('http://www.youtube.com'); yerine
site_kaynak('http://www.youtube.com'); yaz