<?php
require_once("./ArrayToXML.class.php");
echo "<pre>";
echo "The server runs the command";
echo "\n-------------------------------";
/**
* Request 1
*
* Gets the day of the server time
*/
echo "\n-------GET SERVER TIME---------";
// Setup test array
$requestArray = array( "command" => "getServerTime" );
// Dump Request Array to Screen
echo "\n\nRequest Array\n\n";
var_dump( $requestArray );
// Setup & Send Request
$Request = new ArrayToXMLClient( "./commandServer.php", $requestArray );
echo "\n-------------------------------";
// Dump Response Array to Screen
echo "\n\nResponse Array\n\n";
var_dump( $Request->getResponseArray( ) );
echo "\n-------------------------------";
/**
* Request 2
*
* Gets the day of the day of the week
*/
echo "\n------GET DAY OF THE WEEK------";
// Setup test array
$requestArray = array( "command" => "getDayOfTheWeek" );
// Dump Request Array to Screen
echo "\n\nRequest Array\n\n";
var_dump( $requestArray );
// Setup & Send Request
$Request = new ArrayToXMLClient( "./commandServer.php", $requestArray );
echo "\n-------------------------------";
// Dump Response Array to Screen
echo "\n\nResponse Array\n\n";
var_dump( $Request->getResponseArray( ) );
echo "\n-------------------------------";
|