-
Notifications
You must be signed in to change notification settings - Fork 0
/
rpctest.php
executable file
·53 lines (44 loc) · 1.51 KB
/
rpctest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?
include 'IXR_Library.inc.php';
function dump($vars, $label = '', $return = false){
if (ini_get('html_errors')) {
$content = "<pre>\n";
if ($label != '') {
$content .= "<strong>{$label} :</strong>\n";
}
$content .= htmlspecialchars(print_r($vars, true));
$content .= "\n</pre>\n";
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
echo $content;
return null;
}
$client = new IXR_Client('http://gps.2u4u.com.cn/xmlrpc.php');
if(!$client->query('askUserChartInfo', '30', 'SUPER小学生单词王(各关都有奖测试)')){
die('An error occurred
-'.$client->getErrorCode().":".$client->getErrorMessage());
}
dump($client->getResponse());
if(!$client->query('askUserChartInfo', '30', 'SUPER初中单词王')){
die('An error occurred
-'.$client->getErrorCode().":".$client->getErrorMessage());
}
dump($client->getResponse());
if(!$client->query('askUserChartInfo', '30', 'SUPER高中单词王')){
die('An error occurred
-'.$client->getErrorCode().":".$client->getErrorMessage());
}
dump($client->getResponse());
if(!$client->query('askUserChartInfo', '30', 'SUPER大学单词王')){
die('An error occurred
-'.$client->getErrorCode().":".$client->getErrorMessage());
}
dump($client->getResponse());
if(!$client->query('askUserChartInfo', '30', 'SUPER成人单词王')){
die('An error occurred
-'.$client->getErrorCode().":".$client->getErrorMessage());
}
dump($client->getResponse());
?>