PHP Classes

File: simpleServer.php

Recommend this page to a friend!
  Classes of Joe Bloggs   ArrayToXML   simpleServer.php   Download  
File: simpleServer.php
Role: Example script
Content type: text/plain
Description: Server Side Example - Simple
Class: ArrayToXML
Send and receive arrays as XML via HTTP
Author: By
Last change:
Date: 16 years ago
Size: 317 bytes
 

Contents

Class file image Download
<?php
require_once("./ArrayToXML.class.php");

$Server = new ArrayToXMLServer( $HTTP_RAW_POST_DATA );

$myArray = $Server->getRequestArray();

$string = "Hello {$myArray['name']}! You don't look {$myArray['age']}";

$responseArray = array( "response" => $string );

$Server->sendResponse( $responseArray );