XML Feed

4 posts by 3 authors in: Forums > CMS Builder
Last Post: November 25, 2015   (RSS)

Is there a way to generate an XML feed from my website to another company's website?

Thanks in advance.

By Daryl - November 23, 2015

Hi Carole,

The other website's php page can use file_get_contents() function to get your website's XML contents and dump it.
For example (code for other website's page):

$yourWebsitesXmlPageContents = file_get_contents("http://yourwebsite.com/xml.php");
echo $yourWebsitesXmlPageContents;

Let me know if this is the solution you're looking for.

Thanks,

Daryl Maximo
PHP Programmer - interactivetools.com

Hi Daryl

Thanks for this - but how does it work if you've got multiple pages (eg. .php?1, php?2, php?3) with each page containing specific data (drawn from the database) to generate the feed?  At the moment, if it's only a specific page, there would be over 90 pages.

Thanks

Carole