Chris,

I could not reproduce your issue.

I used this test script,

> <?php
>   require 'Services/Eventful.php';
>   $app_key = 'xxxxxxxxxxxxxxxx'; # replace with your key
>   $ev = new Services_Eventful($app_key);
>   $events = $ev->call('events/search', array("date" => "Future", "location" 
> => "Nashville, TN"));
>   
>   if (PEAR::isError($events)) {
>     var_dump($events);
>   } else {
>     print "got " . count($events) . " events\n";
>   }
> ?>

I ran this script on a fresh install of Services_Eventful, with a valid key, 
and I got this output,

> got 9 events


Can you try this script on your setup and see what it prints?

- John Tantalo

On Dec 20, 2011, at 2:39 AM, Chris Rankin wrote:

> 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>";
>               }
>     ?>

Reply via email to