i am trying to read an xml file, when i load a local file which is in the same directory it works fine... but when i try to load a xml file from another domain it gives me an error...
$xml_file = "http://www.somedomain.com/xml/atext.xml
// Opens the file or gives an error message
$fp = fopen($xml_file, "r") or die("Could not open file");
// Reads the file or gives an error message
$data = fread($fp, filesize($xml_file)) or die("Could not read file");
i get the following error...
Warning: filesize(): Stat failed for http://www.somedomain.com/xml/atext.xml
(errno=2 - No such file or directory) in /test.php on line 78
Warning: fread(): Length parameter must be greater than 0. in /test.php on line 78
Could not read file
can someone please help...