//More verbose error reporting, it may help for debugging
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
//Include the API call function we created earlier
require('MakeLiveIDAPICall.php');
//This array holds one or more parameters, as required by each particular method
$params = array(
'method' => "events.quicksummary",
'liveid' => "thehorn",
'max' => "15",
);
foreach ($params as $k => $v) {
$query_string .= "$k=" . urlencode($v) . "&";
}
$xml = MakeLiveIDAPICall($query_string);
$response = simplexml_load_string($xml);
if ($response->{'status'} == "OK")
{
//////
////// If the API call was successful, place code here to handle the response
//////
foreach ($response->element as $element)
{
$liveid = $response->{'liveid'};
$eventid = $element->eventid;
$event_type = $element->event_type;
////// Code for handling each instance (an event, a schedule, etc) of data inside the foreach
}
//////
//////
//////
}
else
{
//Some sort of error occurred
print $response->{'method'};
print $response->{'status'};
print $response->{'time'};
print $response->{'meridixid'};
print $response->{'error_type'};
print $response->{'error_reason'};
}
?>
Click to set custom HTML
makeliveidapicall.php | |
File Size: | 0 kb |
File Type: | php |