Sanırım daha önce yazdığımı çözümleyemediniz.

Buyrun;
$site_kontrol = file_get_contents("http://www.siteadresi.com/home.aspx");
if (!$site_kontrol) { $site= "http://www.siteadresi.com/index.aspx"; }
else { $site = "http://www.siteadresi.com/home.aspx"; }
global $site;
$ch = curl_init();
curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');
curl_setopt($ch, CURLOPT_URL, "".$site."");
curl_setopt($ch, CURLOPT_USERAGENT, "Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);
curl_close($ch);
?>