diff --git a/eg.php b/eg.php new file mode 100644 index 0000000..295cc21 --- /dev/null +++ b/eg.php @@ -0,0 +1,65 @@ + + + + TESTING + + + GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True"); + $template["header"] = " + + + + + + + + + + + + + "; + $template["row"] = " + + + + + + + + + "; + $template["footer"] = " + +
IDOrg.Dest.Plat.SchExp
{id}{org}{dest}{plat}{sch}{act}
+ "; + if (isset($response->GetBoardResult->trainServices->service)) + { + print $template["header"]; + foreach($response->GetBoardResult->trainServices->service as $service) + { + $row = $template["row"]; + $destinations = array(); + + $row = str_replace("{id}",$service->trainid,$row); + $row = str_replace("{org}",$service->origin->location->tiploc,$row); + $row = str_replace("{dest}",$service->destination->location->tiploc,$row); + $row = str_replace("{plat}",$service->platform,$row); + $row = str_replace("{sch}",$servoce->std,$row); + $row = str_replace("{act}",$service->etd,$row); + print $row; + } + print $template["footer"]; + } + ?> + + \ No newline at end of file diff --git a/ldbws.php b/ldbws.php index 625fc6a..a785a35 100644 --- a/ldbws.php +++ b/ldbws.php @@ -2,6 +2,5 @@ include("./php/OpenLDBWS.php"); include("/srv/keys/athena/apiKeys.php"); $OpenLDBWS = new OpenLDBWS($ldbKey); - $response = $OpenLDBWS->GetDepartureBoard(10,"PAD"); - header("Content-Type: text/plain"); - print_r($response); \ No newline at end of file + $response = $OpenLDBWS->GetArrDepBoardWithDetails(10,BRI,getNonPassengerServices="TRUE"); + echo $response \ No newline at end of file diff --git a/php/LDB-Tests/example_output_SV.php b/php/LDB-Tests/example_output_SV.php index 1ed0a07..295cc21 100644 --- a/php/LDB-Tests/example_output_SV.php +++ b/php/LDB-Tests/example_output_SV.php @@ -5,15 +5,15 @@ GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True"); + $OpenLDBWS = new OpenLDBWS($ldbKey); + $response = $OpenLDBWS->GetDepartureBoardByCRS(10,"BRI",date("H:i:s",time()),120,"","","","","True"); $template["header"] = "