Hi all; is there a way to grabbing an xml file from another website? not item by item but all the complete file?
Easiest way: $file = file_get_contents('http://forums.digitalpoint.com/external.php'); PHP: With the URL being the URL of the XML file of course.
<?php $xml = file_get_contents('http://forums.digitalpoint.com/external.php'); echo ($xml); ?> PHP: Whats wrong with this ? it doesnt work properly
No Shawn, it works perfectly actually but the page format is not in xml format - but the source code is exactly same; http://www.maxiturkey.com/catch2.php (pls check and see page source) http://forums.digitalpoint.com/external.php
Yes, source code is xml but file type is not xml, that why i cant see it as xml. How can i do that file a xml file? BUT; header('Content-type: application/xml', true); PHP: i added this but the document is now an XML document. Thanks for all your helps