diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 13:39:33 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-06 13:39:33 +0000 |
commit | b183ebe5aa8da9f77cd412bee077f598182b767d (patch) | |
tree | ddc9bd9afbabe341b47debadd36184fe8ae4fa60 /central/trunk/instadisc.php | |
parent | d3269c436f707db85a703169002bde9b011af3f0 (diff) | |
download | instadisc-b183ebe5aa8da9f77cd412bee077f598182b767d.tar.gz instadisc-b183ebe5aa8da9f77cd412bee077f598182b767d.tar.bz2 instadisc-b183ebe5aa8da9f77cd412bee077f598182b767d.zip |
Central: Tweaked deserialization
Diffstat (limited to 'central/trunk/instadisc.php')
-rw-r--r-- | central/trunk/instadisc.php | 9 |
1 files changed, 7 insertions, 2 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 | } |