I'm lost. :bemused:
Instead of using an static xml file, I am using a request_url. Since the script ITSELF sends the query to eventful, how would I do pagination?
A working query is "http://api.eventful.com/rest/events/search?app_key=p4t8BFcLDtCzpxdS&location=Houston,Tx&sort_order=popularity&date=future&page_number=2" how do I pass that to the script itself?
I'm sure its somewhere along the lines of $SERVER["HTTP_HOST"] . $SERVER["REQUEST_URI"] but im so baffled at this point.
can anyone point me in the right direction?
$request_url = "http://api.eventful.com/rest/events/search?app_key=p4t8BFcLDtCzpxdS&location=Houston,Tx&sort_order=popularity&date=future";
$xml = simplexml_load_file($request_url);
foreach($xml->events->event as $shortcut)
{
$title = $shortcut->{'title'};
$venue = $shortcut->{'venue_name'};
$when = $shortcut->{'start_time'};
$image = $shortcut->image->medium->{'url'};
$genre = $shortcut->performers->performer->{'short_bio'};
$page = $xml->{'page_number'};
$pagecount = $xml->{'page_count'};
$originaltime = $when;
$time = date("F-d", strtotime($originaltime));
echo '<table border="0" cellspacing="0" cellpadding="0">
<tr>';
echo '<td width="150px"></td>';
echo '<td><img border="1" src="'.$image.'" /></td>';
echo '<td align="left" width="800"> <b><font size="4">'.$title.'</font></b><br>';
echo ' <font size="2">'.$genre.'</font><br>';
echo ' <font size="2">'.$time.'</font><br>';
echo ' <font size="2">'.$venue.'</font><br>';