I only speak SyncML. get_child ("SyncHdr")); $request_syncbody = $xml_request->get_child ("SyncBody"); $session_key = md5 ($_SERVER["REMOTE_ADDR"] . $request_synchdr->get_field("Source_LocURI") . $request_synchdr->get_field("SessionID")); // The session handling all the syncml stuff. // Because some devices can't handle querystring parameters or cookies session_id ($session_key); session_start (); $datastores = array (array ("name" => "Notes", "driver" => new sync_vnote_mysql), array ("name" => "AddBook", "driver" => new sync_vcard_mysql), array ("name" => "Calendar", "driver" => new sync_vcalendar_mysql) ); if (@$_SESSION["started"] != 1) { $_SESSION["sync_session"] = new syncml_session ($datastores); $_SESSION["started"] = 1; } $response = new xml_tree_node_c ("SyncML", array("xmlns" => "SYNCML:SYNCML1.0")); $response_synchdr = & $response->new_child ("SyncHdr", NULL); $response_syncbody = & $response->new_child ("SyncBody", NULL); $_SESSION["sync_session"]->handle_next_header ($request_synchdr, &$response_syncbody); $_SESSION["sync_session"]->make_response_header($response_synchdr); // Now handles all the commands foreach ($request_syncbody->children() as $command) { $_SESSION["sync_session"]->handle_command ($command, &$response_syncbody); } $response_syncbody->add_child (new xml_tree_node_c ("Final", NULL)); header ("Content-Type: application/vnd.syncml+xml"); header ("Accept-Charset: UTF-8"); echo "\n"; echo $response->print_node (1, 0); ?>