Upcoming API (PHP5)

·
Upcoming has an extensive API, but in this case I just wanted to get most of the events matching the term 'science':

$params = array(
  'api_key' => 'YOUR_API_KEY',  // http://upcoming.yahoo.com/services/api/keygen.php
  'method' => 'event.search',
  'search_text' => 'science',
  'category' => '2,3,4,5,6,10', // category.getList
  'sort' => 'posted-date-desc', // most recently posted events
  );
$xml = simplexml_load_file('http://upcoming.yahooapis.com/services/rest/' . '?' . http_build_query($params));
foreach ($xml->event as $event)
  print_r($event);