");
print("Server :$server
");
// Initialise curl to call web service
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Set url to get event results table.
$url = "$server/table.json";
curl_setopt($curl, CURLOPT_URL, $url);
// Set up the parameters to pass to the web service
$data = array('org' =>35, 'name' =>'Division One');
$data_string = json_encode($data);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
// Set up the http header (tell server we want JSON)
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string),
)
);
// Call the web service
$result = curl_exec($curl);
// Convert the JSON we got back into an array of events
$results = json_decode($result);
foreach($results as $result) {
if(isset($result->title) ) {
print '
$column | "; } print '
$column | "; } print '