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();
142 function get_interop_servers($include_user=true) {
143 global $HTTP_SERVER_VARS;
146 array('title' => "local xmlrpc interop-server",
147 'info_link' => "http://".$GLOBALS['SERVER_NAME'].dirname($GLOBALS['PHP_SELF'])."/interop-server.php",
148 'desc' => "a php C extension utilizing the xmlrpc-epi library. running locally. by Dan Libby",
150 'host' => $HTTP_SERVER_VARS['SERVER_NAME'],
151 'uri' => dirname($HTTP_SERVER_VARS['SCRIPT_NAME']) . "/interop-server.php",
152 'port' => $HTTP_SERVER_VARS['SERVER_PORT'],
155 array('title' => "Frontier 7.0b43",
156 'info_link' => "http://groups.yahoo.com/group/xml-rpc/message/2585",
157 'desc' => "Jake Savin's Server. First Interop Node",
159 'host' => "www.soapware.org",
163 array('title' => "XMLRPC.Net",
164 'info_link' => "http://aspx.securedomains.com/cookcomputing/interopechotests.aspx",
165 'desc' => "client/server by Charles Cook",
167 'host' => "aspx.securedomains.com",
168 'uri' => "/cookcomputing/interopechotests.aspx",
171 array('title' => "xmlrpc-c",
172 'info_link' => "http://xmlrpc-c.sourceforge.net",
173 'desc' => "a C library by Eric Kidd",
175 'host' => "xmlrpc-c.sourceforge.net",
176 'uri' => "/cgi-bin/interop.cgi",
179 array('title' => "Usefulinc",
180 'info_link' => "http://xmlrpc.usefulinc.com/",
181 'desc' => "a PHP script library by Edd Dumbill",
183 'host' => "xmlrpc.usefulinc.com",
184 'uri' => "/demo/server.php",
187 array('title' => "XML-RPC for ASP",
188 'info_link' => "http://aspxmlrpc.sourceforge.net",
190 'host' => "www.wc.cc.va.us",
191 'uri' => "/dtod/xmlrpc/testing/interop.asp",
194 array('title' => "Frontier-RPC 0.07b3 (Perl)",
196 'host' => "bitsko.slc.ut.us",
197 'uri' => "/cgi-bin/interop.pl",
200 array('title' => "XMLRPC::Lite, v0.50",
202 'host' => "xmlrpc.soaplite.com",
203 'uri' => "/interop.cgi",
209 $list[] = get_user_server();
215 function print_servers_form($server_list, $action_url=false, $print_user=true) {
216 $action = $action_url ? "action='$action_url'" : "";
218 echo "<form method='get' $action>";
220 foreach ($server_list as $key => $server) {
221 $title = $server['title'];
222 $link = $server['info_link'];
223 $type = $server['type'];
224 $port = $server['port'];
225 $default = $server["default"] ? "checked" : "";
227 $title = "<a href='$link'>$title</a>";
229 echo "<input type='radio' name='server' value='$key' $default> $title<br>";
231 if($type === "user") {
232 echo "<DL><DT><DL><DT>host: <input type='text' name='user_host' size='50'></DT>" .
233 "<DT>uri: <input type='text' name='user_uri' size='50'>" .
234 "<DT>port: <input type='text' name='user_port' size='4' MAXLENGTH='4' VALUE='$port'></DT></DL></DT></DL>";
238 if ($GLOBALS['HTTP_GET_VARS']['start_debug'])
239 echo "<input type='hidden' name='start_debug' value='1'>";
241 <h3>Verbosity level</h3>
242 <input type='radio' name='debug' value='0' checked>none
243 <input type='radio' name='debug' value='1'>some
244 <input type='radio' name='debug' value='2'>much
246 <h3>XML Serialization</h3>
247 <input type='radio' name='version' value='xmlrpc' checked>XML-RPC
248 <input type='radio' name='version' value='soap 1.1'>SOAP
249 <input type='radio' name='version' value='simple'>simpleRPC
251 <input type='submit' value='Start test'>
257 function get_server_from_user($server_list) {
258 return $server_list[$GLOBALS['HTTP_GET_VARS']['server']];
261 function server_uri_vars() {
262 extract($GLOBALS['HTTP_GET_VARS']);
263 return "server=$server&user_host=$user_host&user_port=$user_port&user_uri=$user_uri";
266 function server_vars() {
267 extract($GLOBALS['HTTP_GET_VARS']);
270 'user_host' => $user_host,
271 'user_port' => $user_port,
272 'user_uri' => $user_uri