Created
July 18, 2012 13:03
-
-
Save raytiley/3136082 to your computer and use it in GitHub Desktop.
Messed around with customer's file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('America/New_York'); | |
$client = new SoapClient('http://frontdoor.ctn5.org/CablecastWS/CablecastWS.asmx?WSDL', array('cache_wsdl' => 0)); | |
$searchLength = strtotime(date("Y-m-d")."T".date("H:i:s")) + (60*60*24*35); | |
$channelID = 1; | |
$showID = 1; | |
$schedule = $client->GetScheduleInformation(array( | |
'ChannelID' => $channelID, | |
'FromDate' => date("Y-m-d")."T00:00:00", | |
'ToDate' => date("Y-m-d", $searchLength)."T".date("H:i:s", $searchLength), | |
'restrictToShowID' => $showID)); | |
//Cast results to an array if not already | |
$results = is_array($schedule->GetScheduleInformationResult->ScheduleInfo) ? | |
$schedule->GetScheduleInformationResult->ScheduleInfo : | |
array($schedule->GetScheduleInformationResult->ScheduleInfo); | |
var_dump($results); | |
foreach($results as $run) | |
{ | |
echo date("r",strtotime($run->StartTime)) . "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment