about summary refs log tree commit diff stats
path: root/central
diff options
context:
space:
mode:
Diffstat (limited to 'central')
-rw-r--r--central/trunk/instadisc.php9
-rw-r--r--central/trunk/xmlrpc.php5
2 files changed, 11 insertions, 3 deletions
diff --git a/central/trunk/instadisc.php b/central/trunk/instadisc.php index 421f058..6735f32 100644 --- a/central/trunk/instadisc.php +++ b/central/trunk/instadisc.php
@@ -58,7 +58,7 @@ function instaDisc_sendItem($username, $id)
58 $getuser2 = mysql_query($getuser); 58 $getuser2 = mysql_query($getuser);
59 $getuser3 = mysql_fetch_array($getuser2); 59 $getuser3 = mysql_fetch_array($getuser2);
60 60
61 $fp = fsockopen($getuser3['ip'], 4444, $errno, $errstr); 61 $fp = @fsockopen($getuser3['ip'], 4444, $errno, $errstr);
62 if ($fp) 62 if ($fp)
63 { 63 {
64 $verID = rand(1,65536); 64 $verID = rand(1,65536);
@@ -71,7 +71,8 @@ function instaDisc_sendItem($username, $id)
71 $out .= 'Author: ' . $getitem3['author'] . "\r\n"; 71 $out .= 'Author: ' . $getitem3['author'] . "\r\n";
72 $out .= 'URL: ' . $getitem3['url'] . "\r\n"; 72 $out .= 'URL: ' . $getitem3['url'] . "\r\n";
73 73
74 foreach (deserialize($getitem3['semantics']) as $name => $value) 74 $semantics = deserialize($getitem3['semantics']);
75 foreach ($semantics as $name => $value)
75 { 76 {
76 $out .= $name . ': ' . $value . "\r\n"; 77 $out .= $name . ': ' . $value . "\r\n";
77 } 78 }
@@ -80,6 +81,10 @@ function instaDisc_sendItem($username, $id)
80 81
81 fwrite($fp, $out); 82 fwrite($fp, $out);
82 fclose($fp); 83 fclose($fp);
84
85 return true;
86 } else {
87 return false;
83 } 88 }
84 } 89 }
85} 90}
diff --git a/central/trunk/xmlrpc.php b/central/trunk/xmlrpc.php index 5373f80..18aa6cb 100644 --- a/central/trunk/xmlrpc.php +++ b/central/trunk/xmlrpc.php
@@ -63,7 +63,10 @@ function requestRetained($username, $verification, $verificationID)
63 $i=0; 63 $i=0;
64 while ($getitems3[$i] = mysql_fetch_array($getitems2)) 64 while ($getitems3[$i] = mysql_fetch_array($getitems2))
65 { 65 {
66 instaDisc_sendItem($username, $getitems3[$i]['itemID']); 66 if (!instaDisc_sendItem($username, $getitems3[$i]['itemID']))
67 {
68 return new xmlrpcresp(new xmlrpcval(1, "int"));
69 }
67 $i++; 70 $i++;
68 } 71 }
69 72