There is site , shop.test.com.au (not a real name)
when ever i tried to take the site through
http://shop.test.com.au/ , it will change to shop.test.com.au in the browser
They providing an xml page link on that site
I need to access that xml from my php page
Following is my code
$doc = new DOMDocument();
$doc->load('shop.test.com.au/1.xml');
Then it will return an error “failed to open stream: No such file or directory“, may be it is checking in my local machine.So i changed the code to
$doc = new DOMDocument();
$doc->load('http://shop.test.com.au/1.xml');
Then i gets an error “failed to open stream: HTTP request failed!“
How can i solve it?
the best would be to use CURL, make sure you have CURL installed and then use this
And there you go – $xml should be having the data you desire.