PageRenderTime 162ms CodeModel.GetById 80ms app.highlight 2ms RepoModel.GetById 78ms app.codeStats 0ms

/ext/php_xmlrpc/client-sample.php

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
PHP | 34 lines | 23 code | 8 blank | 3 comment | 2 complexity | a6d3489bccce5ef6faa0d1f3a899cfb8 MD5 | raw file
 1<html>
 2
 3<body>
 4
 5<?php
 6error_reporting(E_ALL);
 7ini_set('display_errors', '1');
 8include 'xmlrpc.inc';
 9
10// Make an object to represent our server.
11$client = new xmlrpc_client('/~anti/PhpProject1/server.php',
12                            'localhost', 80);
13$client->setdebug(1);
14
15// Send a message to the server.
16$message = new xmlrpcmsg('getNewContacts',
17                         array(new xmlrpcval("20010716T18:16:18", 'dateTime.iso8601'),
18                               new xmlrpcval("20010716T18:16:18", 'dateTime.iso8601')));
19$result = $client->send($message);
20
21// Process the response.
22if (!$result) {
23    print "<p>Could not connect to HTTP server.</p>";
24} elseif ($result->faultCode()) {
25    print "<p>XML-RPC Fault #" . $result->faultCode() . ": " .
26        $result->faultString();
27} else {
28
29   print "<p>XML-RPC Response : " .$result-> serialize()."</p>";
30
31}
32?>
33
34</body></html>