about summary refs log tree commit diff stats
path: root/central/trunk/instadisc.php
diff options
context:
space:
mode:
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r--central/trunk/instadisc.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index d32d2d7..9920e51 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php
@@ -37,6 +37,28 @@ function instaDisc_sendUpdateNotice($softwareVersion)
37 37
38function instaDisc_sendDatabase($cserver) 38function instaDisc_sendDatabase($cserver)
39{ 39{
40 $getdb = "SELECT * FROM centralServers";
41 $getdb2 = mysql_query($getdb);
42 $i=0;
43 while ($getdb3[$i] = mysql_fetch_array($getdb2))
44 {
45 $db[$getdb3[$i]['url']] = $getdb3[$i]['key'];
46 $i++;
47 }
48
49 $cserver2 = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
50 $getuk = "SELECT * FROM centralServers WHERE url = \"" . mysql_escape_string($cserver2) . "\"";
51 $getuk2 = mysql_query($getuk);
52 $getuk3 = mysql_fetch_array($getuk2);
53
54 $verID = rand(1,65536);
55
56 $client = new xmlrpc_client($cserver);
57 $msg = new xmlrpcmsg("InstaDisc.sendDatabase", array( new xmlrpcval($cserver2, 'string'),
58 new xmlrpcval(md5($cserver2 + ":" + $getuk3['key'] + ":" + $verID), 'string'),
59 new xmlrpcval($verID, 'int'),
60 new xmlrpcval($db, 'array')));
61 $client->send($msg);
40} 62}
41 63
42function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics) 64function instaDisc_addItem($username, $subscription, $title, $author, $url, $semantics)