Hello All. Can anybody help me create an index.php file which does the following:
I have the following URL:
which returns an XML file which is generated by an online database.
The parameter [filename] can have one of four values:
retailers
categories
subcategories
discounts
The “&show=” parameter determines the number of records to be included.
= = = = = = = = = = = = = =
What I need is a way to capture this XML file so that I can download it to my PC.
I also need to be able to”
(1) select between which of the 4 [filename] parameters is submitted, and also
(2) adjust the value of the “&show=” parameter between 1 and 9999999999.
The name of each saved XML file should be in a format similar to the following:
[filename]-[timestamp]-[&show]
where
[filename] is one of the four words given above
[timestamp] is the date/time at time of capture
[&show] is the value of “&show=” submitted
The timestamp can be a string such as 2013-10-23-1125 (meaning 23rd October 2013 at 11:25am) or any other meaningful timestamp if that is easier.
For example, a file might be called:
discounts-2013-10-23-1125-999.xml
= = = = = = = = = = = =
During testing the “&show=” value must be restricted to a small value such as 10 or 20.
= = = = = = = = = = = =
I have FTP access to my own domain, which is running PHP5, and so it would be sufficient for the PHP code to be in an index.php file which saves all the XML files into the same folder as itself, from where I can download them at my leisure.
= = = = = = = = = = = = =