Hi guys,
Maybe I'm missing something obvious but when making searches from my PHP
script to events. Only 1 result is being returned. I've tried searching by
zipcode and radius, etc, etc. It says there's 3000+ matches but only every
returns one event. And if you refresh the page you'll notice it's often a
different event each time. What am I missing here? Below is the code in
question. And you can see the actual page results here:
http://www.nashvilleluxurylimos.com/events.php
<?php
require 'Services/Eventful.php';
<?php
// Enter your application key here. (See
http://api.eventful.com/keys/)
$app_key = 'xxxxxxxxx'; # Don't worry the actual API key is there
in the script
$ev = new Services_Eventful($app_key);
$event = $ev->call('events/search', array("date" => "Future",
"location" => "Nashville, TN"));
if ( PEAR::isError($event) )
{
print("An error occurred: " . $event->getMessage() . "\n");
print_r( $ev );
}
foreach( $event->events as $item )
{
echo "<div class='item'>";
echo "<h4><a href='", html_entity_decode($item->event->url), "'
target='_blank'>", html_entity_decode($item->event->title), "</a></h4>";
echo "<div class='item-body'>";
echo html_entity_decode($item->event->description);
echo "</div>";
echo "<div class='clear'></div>";
echo "</div>";
}
?>