Hi, I have a problem.
I'd like to read the XML response from a www.somewhere.com/xmlresponse.asp
in format of
<response>
<tags />
</response>
Thats it. I've tried to use the example from php.net for reading the html response, but it doenst work. Also other people told me to use:
<?php
$filename = ("http://www.somewhere.com/xmlresponse.asp");
$fd = fopen($filename, "r");
$contents = '';
while (!feof($fd)) {
$contents .= fread($fd,4096);
}
fclose ($fd);
?>
At it give same errors aboout file descriptor:
Warning: fopen("http://www.somewhere.com/xmlresponse.asp","r") - Bad file descriptor in /home/www/xml/get.php on line 3
Warning: Supplied argument is not a valid File-Handle resource in /home/www/xml/get.php on line 5
Warning: Supplied argument is not a valid File-Handle resource in /home/www/xml/get.php on line 6
Please help me!
Is it even passible to do in PHP?