What I want is that automatically a web pager message is sent to my icq when a certain page is being accessed (e.g. a 404 page when Search Engines try to access a non- existing site).
The PHP part is what I've written, the HTML part is copy and paste from the original icq web pager interface.
<?
function PostToHost($host, $path, $referer, $data_to_send) {
$fp = fsockopen($host, 80);
printf("Open!\n");
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Referer: $referer\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ". strlen($data_to_send) ."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, "$data_to_send\n");
printf("Sent!\n");
while(!feof($fp)) {
$res .= fgets($fp, 128);
}
printf("Done!\n");
fclose($fp);
return $res;
}
//if(eregi("(googlebot|scooter|fast|find|slurp|crawl|search|seek|spider)",_$HTTP_USER_AGENT))_{
$data = "from=SE-Bots&body=404_while_SE-Bots&to=1128681";
printf("Go!\n");
$x = PostToHost(
"www.icq.com",
"/scripts/WWPMsg.dll",
"http://www.wsjb78.com/icqpanel.php",
$data
);
//}
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE></TITLE>
</HEAD><BODY>
Official copy'n'paste web pager panel:<br>
<form action="http://wwp.icq.com/scripts/WWPMsg.dll" method="post">
<center>
<table border="2" cellpadding="1" cellspacing="1"><tr><td>
<table cellpadding="0" cellspacing="0" border="0" bgcolor="silver">
<tr>
<td align="center" nowrap colspan="2" bgcolor="#0000a0">
<font size="-1" face="arial" color="white"><b>The ICQ Online-Message Panel</b></font></td>
</tr>
<tr>
<td align="center"><font size="-2" face="ms sans serif" color="black"><b>Sender Name</b> (optional):</font><br><input type="text" name="from" value="" size=15 maxlength=40 onfocus="this.select()"></td>
<td align="center"><font size="-2" face="ms sans serif" color="black"><b>Sender EMail</b> (optional):</font><br><input type="text" name="fromemail" value="" size=15 maxlength=40 onfocus="this.select()">
<input type="hidden" name="subject" value="From Your Web Page"></td>
</tr>
<tr>
<td align="center" colspan="2"><font size="-2" face="ms sans serif" color="black">Message:</font><br>
<textarea name="body" rows="3" cols="30" wrap="Virtual"></textarea><br></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="hidden" name="to" value="1128681">
<input type="submit" name="Send" value="Send Message">
<input type="reset" value="Clear">
</td>
</tr>
<tr>
<td align="center" nowrap colspan="2">
<font size="-2" face="ms sans serif"> <br><a href="http://public.icq.com/public/panels/messagepanel/links/wwp.html?1128681">My Unified Messaging Center</a>
<a href="http://public.icq.com/public/panels/messagepanel/links/icq.html">What is ICQ, Download</a>
<br><a href="http://public.icq.com/public/panels/messagepanel/links/messagepanel.html">Install this Online Message Panel on your homepage</a></font></td>
</tr>
</table>
</td></tr></table>
<font face="MS Sans Serif" size="-2"><a href="/public/panels/messagepanel/links/messagepanel.html">This site is powered by the ICQ Online-Message Panel</a> © 1999 ICQ Inc. All Rights Reserved.<br>Use of the ICQ Online-Message Panel is subject to the <a href="http://public.icq.com/public/panels/webcast/links/legal.html">Terms of Service</font></form>
</center>
</BODY></HTML>
The web page form from ICQ works but not my PHP attempt.
1128681 is my ICQ number and the script is like that on http://www.wsjb78.com/ icqpanel.php
wsjb78