Need a simple PHP script (web service) that will be serving up records from an XML file.
The XML file contains records. Each record looks like this:
<iPhone_banner>[url removed, login to view]</iPhone_banner>
<BB_banner>[url removed, login to view]</BB_banner>
<Link>[url removed, login to view]</Link>
The PHP script should read the file, and return one record in XML format. The record should be chosen based on the <weight> tag. So if the <weight> value is 10, then this record should be chosen 10% of the time. If it is 60, then it should be chosen 60% of the time.
The XML file is called [url removed, login to view], a sample of it is attached.
I must be able to add records to [url removed, login to view] and the PHP script should still work fine.