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'])."/../../index.php",
32 'host' => $GLOBALS['SERVER_NAME'],
33 'uri' => dirname($GLOBALS['PHP_SELF'])."/../../index.php",
34 'port' => $GLOBALS['SERVER_PORT'],
37 array('title' => "local dba-test",
38 'info_link' => "http://".$GLOBALS['SERVER_NAME']."/wiki/dba",
40 'host' => $GLOBALS['SERVER_NAME'],
44 array('title' => "local pear-test",
45 'info_link' => "http://".$GLOBALS['SERVER_NAME']."/wiki/pear",
47 'host' => $GLOBALS['SERVER_NAME'],
48 'uri' => "/wiki/pear",
51 array('title' => "local adodb-test",
52 'info_link' => "http://".$GLOBALS['SERVER_NAME']."/wiki/adodb",
54 'host' => $GLOBALS['SERVER_NAME'],
55 'uri' => "/wiki/adodb",
58 array('title' => "PhpWiki",
59 'info_link' => "http://phpwiki.sourceforge.net/phpwiki/",
61 'host' => "phpwiki.sourceforge.net",
65 array('title' => "PhpWikiDemo",
66 'info_link' => "http://phpwiki.sourceforge.net/demo/",
68 'host' => "phpwiki.sourceforge.net",
75 $list[] = get_user_server();
81 function get_intro_useful_servers($include_user=true) {
84 array('title' => "xmlrpc-epi ( local! )",
85 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
87 'host' => $GLOBALS['SERVER_NAME'],
88 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "interop-server.php",
89 'port' => $GLOBALS['SERVER_PORT'],
92 array('title' => "Meerkat",
93 'info_link' => "http://www.oreillynet.com/meerkat/xml-rpc/",
95 'host' => "www.oreillynet.com",
96 'uri' => "/meerkat/xml-rpc/server.php",
99 array('title' => "Usefulinc",
100 'info_link' => "http://xmlrpc.usefulinc.com/php.html",
102 'host' => "xmlrpc.usefulinc.com",
103 'uri' => "/demo/server.php",
109 $list[] = get_user_server();
115 function get_introspection_servers($include_user=true) {
118 array('title' => "xmlrpc-epi interop server",
119 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
121 'host' => $GLOBALS['SERVER_NAME'],
122 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "interop-server.php",
123 'port' => $GLOBALS['SERVER_PORT'],
126 array('title' => "xmlrpc-epi validation server",
127 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/validate.php",
129 'host' => $GLOBALS['SERVER_NAME'],
130 'uri' => substr($GLOBALS['PHP_SELF'], 0, strrpos($GLOBALS['PHP_SELF'], "/") + 1) . "validate.php",
131 'port' => $GLOBALS['SERVER_PORT'],
136 $list[] = get_user_server();
143 function get_interop_servers($include_user=true) {
144 global $HTTP_SERVER_VARS;
147 array('title' => "local xmlrpc interop-server",
148 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
149 'desc' => "a php C extension utilizing the xmlrpc-epi library. running locally. by Dan Libby",
151 'host' => $HTTP_SERVER_VARS['SERVER_NAME'],
152 'uri' => dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) . "/interop-server.php",
153 'port' => $HTTP_SERVER_VARS['SERVER_PORT'],
156 array('title' => "Frontier 7.0b43",
157 'info_link' => "http://groups.yahoo.com/group/xml-rpc/message/2585",
158 'desc' => "Jake Savin's Server. First Interop Node",
160 'host' => "www.soapware.org",
164 array('title' => "XMLRPC.Net",
165 'info_link' => "http://aspx.securedomains.com/cookcomputing/interopechotests.aspx",
166 'desc' => "client/server by Charles Cook",
168 'host' => "aspx.securedomains.com",
169 'uri' => "/cookcomputing/interopechotests.aspx",
172 array('title' => "xmlrpc-c",
173 'info_link' => "http://xmlrpc-c.sourceforge.net",
174 'desc' => "a C library by Eric Kidd",
176 'host' => "xmlrpc-c.sourceforge.net",
177 'uri' => "/cgi-bin/interop.cgi",
180 array('title' => "Usefulinc",
181 'info_link' => "http://xmlrpc.usefulinc.com/",
182 'desc' => "a PHP script library by Edd Dumbill",
184 'host' => "xmlrpc.usefulinc.com",
185 'uri' => "/demo/server.php",
188 array('title' => "XML-RPC for ASP",
189 'info_link' => "http://aspxmlrpc.sourceforge.net",
191 'host' => "www.wc.cc.va.us",
192 'uri' => "/dtod/xmlrpc/testing/interop.asp",
195 array('title' => "Frontier-RPC 0.07b3 (Perl)",
197 'host' => "bitsko.slc.ut.us",
198 'uri' => "/cgi-bin/interop.pl",
201 array('title' => "XMLRPC::Lite, v0.50",
203 'host' => "xmlrpc.soaplite.com",
204 'uri' => "/interop.cgi",
210 $list[] = get_user_server();
216 function print_servers_form($server_list, $action_url=false, $print_user=true) {
217 $action = $action_url ? "action='$action_url'" : "";
219 echo "<form method='get' $action>";
221 foreach ($server_list as $key => $server) {
222 $title = $server['title'];
223 $link = $server['info_link'];
224 $type = $server['type'];
225 $port = $server['port'];
226 $default = $server["default"] ? "checked" : "";
228 $title = "<a href='$link'>$title</a>";
230 echo "<input type='radio' name='server' value='$key' $default> $title<br>";
232 if($type === "user") {
233 echo "<DL><DT><DL><DT>host: <input type='text' name='user_host' size='50'></DT>" .
234 "<DT>uri: <input type='text' name='user_uri' size='50'>" .
235 "<DT>port: <input type='text' name='user_port' size='4' MAXLENGTH='4' VALUE='$port'></DT></DL></DT></DL>";
239 if ($GLOBALS['HTTP_GET_VARS']['start_debug'])
240 echo "<input type='hidden' name='start_debug' value='1'>";
242 <h3>Verbosity level</h3>
243 <input type='radio' name='debug' value='0' checked>none
244 <input type='radio' name='debug' value='1'>some
245 <input type='radio' name='debug' value='2'>much
247 <h3>XML Serialization</h3>
248 <input type='radio' name='version' value='xmlrpc' checked>XML-RPC
249 <input type='radio' name='version' value='soap 1.1'>SOAP
250 <input type='radio' name='version' value='simple'>simpleRPC
252 <input type='submit' value='Start test'>
258 function get_server_from_user($server_list) {
259 return $server_list[$GLOBALS['HTTP_GET_VARS']['server']];
262 function server_uri_vars() {
263 extract($GLOBALS['HTTP_GET_VARS']);
264 return "server=$server&user_host=$user_host&user_port=$user_port&user_uri=$user_uri";
267 function server_vars() {
268 extract($GLOBALS['HTTP_GET_VARS']);
271 'user_host' => $user_host,
272 'user_port' => $user_port,
273 'user_uri' => $user_uri