3 * List of various interop and wiki servers to test against.
4 * interop for the basic library functionality, and then the wiki API.
7 if (empty($GLOBALS['SERVER_NAME'])) {
8 global $HTTP_SERVER_VARS;
9 $GLOBALS['SERVER_NAME'] = $HTTP_SERVER_VARS['SERVER_NAME'];
10 $GLOBALS['SERVER_PORT'] = $HTTP_SERVER_VARS['SERVER_PORT'];
11 $GLOBALS['PHP_SELF'] = $HTTP_SERVER_VARS['SCRIPT_NAME'];
14 function get_user_server() {
16 array('title' => "user defined",
17 'desc' => "Enter your own server to test against",
19 'host' => $GLOBALS['HTTP_GET_VARS']['user_host'],
20 'uri' => $GLOBALS['HTTP_GET_VARS']['user_uri'],
21 'port' => ($GLOBALS['HTTP_GET_VARS']['user_port'] ? $GLOBALS['HTTP_GET_VARS']['user_port'] : 80),
26 function get_wiki_servers($include_user=true) {
29 array('title' => " local ",
30 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/../../RPC2.php",
32 'host' => $GLOBALS['SERVER_NAME'],
33 'uri' => dirname($GLOBALS['PHP_SELF'])."/../../RPC2.php",
34 'port' => $GLOBALS['SERVER_PORT'],
37 array('title' => "PhpWiki",
38 'info_link' => "http://phpwiki.sourceforge.net/phpwiki/RPC2.php",
40 'host' => "phpwiki.sourceforge.net",
41 'uri' => "/phpwiki/RPC2.PHP",
44 array('title' => "PhpWikiDemo",
45 'info_link' => "http://phpwiki.sourceforge.net/demo/RPC2.php",
47 'host' => "phpwiki.sourceforge.net",
48 'uri' => "/demo/RPC2.php",
54 $list[] = get_user_server();
60 function get_intro_useful_servers($include_user=true) {
63 array('title' => "xmlrpc-epi ( local! )",
64 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
66 'host' => $GLOBALS['SERVER_NAME'],
67 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "interop-server.php",
68 'port' => $GLOBALS['SERVER_PORT'],
71 array('title' => "Meerkat",
72 'info_link' => "http://www.oreillynet.com/meerkat/xml-rpc/",
74 'host' => "www.oreillynet.com",
75 'uri' => "/meerkat/xml-rpc/server.php",
78 array('title' => "Usefulinc",
79 'info_link' => "http://xmlrpc.usefulinc.com/php.html",
81 'host' => "xmlrpc.usefulinc.com",
82 'uri' => "/demo/server.php",
88 $list[] = get_user_server();
94 function get_introspection_servers($include_user=true) {
97 array('title' => "xmlrpc-epi interop server",
98 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
100 'host' => $GLOBALS['SERVER_NAME'],
101 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "interop-server.php",
102 'port' => $GLOBALS['SERVER_PORT'],
105 array('title' => "xmlrpc-epi validation server",
106 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/validate.php",
108 'host' => $GLOBALS['SERVER_NAME'],
109 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "validate.php",
110 'port' => $GLOBALS['SERVER_PORT'],
115 $list[] = get_user_server();
122 function get_interop_servers($include_user=true) {
123 global $HTTP_SERVER_VARS;
126 array('title' => "local xmlrpc interop-server",
127 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
128 'desc' => "a php C extension utilizing the xmlrpc-epi library. running locally. by Dan Libby",
130 'host' => $HTTP_SERVER_VARS['SERVER_NAME'],
131 'uri' => dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) . "/interop-server.php",
132 'port' => $HTTP_SERVER_VARS['SERVER_PORT'],
135 array('title' => "Frontier 7.0b43",
136 'info_link' => "http://groups.yahoo.com/group/xml-rpc/message/2585",
137 'desc' => "Jake Savin's Server. First Interop Node",
139 'host' => "www.soapware.org",
143 array('title' => "XMLRPC.Net",
144 'info_link' => "http://aspx.securedomains.com/cookcomputing/interopechotests.aspx",
145 'desc' => "client/server by Charles Cook",
147 'host' => "aspx.securedomains.com",
148 'uri' => "/cookcomputing/interopechotests.aspx",
151 array('title' => "xmlrpc-c",
152 'info_link' => "http://xmlrpc-c.sourceforge.net",
153 'desc' => "a C library by Eric Kidd",
155 'host' => "xmlrpc-c.sourceforge.net",
156 'uri' => "/cgi-bin/interop.cgi",
159 array('title' => "Usefulinc",
160 'info_link' => "http://xmlrpc.usefulinc.com/",
161 'desc' => "a PHP script library by Edd Dumbill",
163 'host' => "xmlrpc.usefulinc.com",
164 'uri' => "/demo/server.php",
167 array('title' => "XML-RPC for ASP",
168 'info_link' => "http://aspxmlrpc.sourceforge.net",
170 'host' => "www.wc.cc.va.us",
171 'uri' => "/dtod/xmlrpc/testing/interop.asp",
174 array('title' => "Frontier-RPC 0.07b3 (Perl)",
176 'host' => "bitsko.slc.ut.us",
177 'uri' => "/cgi-bin/interop.pl",
180 array('title' => "XMLRPC::Lite, v0.50",
182 'host' => "xmlrpc.soaplite.com",
183 'uri' => "/interop.cgi",
189 $list[] = get_user_server();
195 function print_servers_form($server_list, $action_url=false, $print_user=true) {
196 $action = $action_url ? "action='$action_url'" : "";
198 echo "<form method='get' $action>";
200 foreach ($server_list as $key => $server) {
201 $title = $server['title'];
202 $link = $server['info_link'];
203 $type = $server['type'];
204 $port = $server['port'];
205 $default = $server["default"] ? "checked" : "";
207 $title = "<a href='$link'>$title</a>";
209 echo "<input type='radio' name='server' value='$key' $default> $title<br>";
211 if($type === "user") {
212 echo "<DL><DT><DL><DT>host: <input type='text' name='user_host' size='50'></DT>" .
213 "<DT>uri: <input type='text' name='user_uri' size='50'>" .
214 "<DT>port: <input type='text' name='user_port' size='4' MAXLENGTH='4' VALUE='$port'></DT></DL></DT></DL>";
218 if ($GLOBALS['HTTP_GET_VARS']['start_debug'])
219 echo "<input type='hidden' name='start_debug' value='1'>";
221 <h3>Verbosity level</h3>
222 <input type='radio' name='debug' value='0' checked>none
223 <input type='radio' name='debug' value='1'>some
224 <input type='radio' name='debug' value='2'>much
226 <h3>XML Serialization</h3>
227 <input type='radio' name='version' value='xmlrpc' checked>XML-RPC
228 <input type='radio' name='version' value='soap 1.1'>SOAP
229 <input type='radio' name='version' value='simple'>simpleRPC
231 <input type='submit' value='Start test'>
237 function get_server_from_user($server_list) {
238 return $server_list[$GLOBALS['HTTP_GET_VARS']['server']];
241 function server_uri_vars() {
242 extract($GLOBALS['HTTP_GET_VARS']);
243 return "server=$server&user_host=$user_host&user_port=$user_port&user_uri=$user_uri";
246 function server_vars() {
247 extract($GLOBALS['HTTP_GET_VARS']);
250 'user_host' => $user_host,
251 'user_port' => $user_port,
252 'user_uri' => $user_uri