simplexml_load_file problem!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gim.daniel
Forum Newbie
Posts: 2
Joined: Mon Jul 03, 2006 6:52 am

simplexml_load_file problem!

Post by gim.daniel »

hello

can anyone help me with this output when using the simplexml_load_file function in php5?

Warning: simplexml_load_file(http://api.search.yahoo.com/WebSearchSe ... esults=100) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/mediama/public_html/product.php on line 14

Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://api.search.yahoo.com/WebSearchSe ... esults=100" in /home/mediama/public_html/product.php on line 14

Source: http://www.media-market.co.uk/product.p ... B000B83Z4O


However, the weird thing is, earlier in the script...

$request = "http://webservices.amazon.co.uk/onca/xm ... Id=".$code;
$response = simplexml_load_file($request);

works absolutely fine!!

any ideas?
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

What happens if you visit http://api.search.yahoo.com/WebSearchSe ... esults=100 from the box you are running this script from?
Post Reply