I'm trying to get the contents of a page this way:
<?php
include_once 'simple_html_dom.php';
$opts = array('http' =>
array(
'method' => 'GET',
'timeout' => 10
)
);
$domain = "http://www.esperandoaramon.com";
//$domain = "http://www.google.com";
$context = stream_context_create($opts);
$input = @file_get_contents($domain,false,$context) or die("Could not access file: $domain");
echo($input);
?>
I can get www.google.com contents this way, unfortunately the other domain gives me only this notification:
Notice:
Text: Undefined index: HTTP_ACCEPT
File: /home/trdeport/public_html/esperandoaramon/_visit.php
Line: 4
This HTTP_ACCEPT is killing me... the page runs perfectly on a browser. Is there any workaround?