summary refs log tree commit diff stats
path: root/xmlrpc.php
diff options
context:
space:
mode:
Diffstat (limited to 'xmlrpc.php')
-rwxr-xr-xxmlrpc.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/xmlrpc.php b/xmlrpc.php index 2c634d3..69990da 100755 --- a/xmlrpc.php +++ b/xmlrpc.php
@@ -58,9 +58,21 @@ function ping($xmlrpcmsg)
58 $title = $from; 58 $title = $from;
59 } 59 }
60 60
61 $text = substr($page_data,(stripos($page_data,$to)-300),700); 61 preg_match_all('/HREF="([^"]+)">([^>]+)<\/A>/i',$page_data,$matches);
62 $text = strip_tags($text); 62 for ($i=0;$i<count($matches[1]);$i++)
63 $text = str_replace("\n",' ',$text); 63 {
64 if ($matches[1][$i] == $to)
65 {
66 $find = $matches[2][$i];
67 }
68 }
69
70 $text = strip_tags($page_data);
71 $text = substr($text,(stripos($text,$find)-300),700);
72 $text = str_ireplace('<BR>',"\n",$text);
73 $text = str_ireplace('<BR />',"\n",$text);
74 $text = str_replace("\t", ' ', $text);
75 $text = preg_replace('/' . "\n" . '([ ]*)' . "\n" . '/i', '', $text);
64 76
65 $commentText = "[url=" . $from . "]" . $title . "[/url]\n\n[....] " . $text . " [....]"; 77 $commentText = "[url=" . $from . "]" . $title . "[/url]\n\n[....] " . $text . " [....]";
66 78