Read and Download a XML File
I was working on a project when i needed to download an XML file and store it localy, to prevent slow scripts, because this XML file had 47 items.
When i would store it my script would work much faster! So i searched, and asked and found this:
<?php $geturl = 'http://www.site.com/example.xml'; $savelocal = 'file.xml'; file_put_contents( $savelocal, file_get_contents( $geturl ) ); ?>
It is this simple and it works totaly fine!