#native_company# #native_desc#

ICQ Message Sender

By Michal Taborsky
on December 6, 2000

Version: 1.0

Type: Function

Category: HTTP

License: GNU General Public License

Description: A function that sends an ICQ message to specified UIN thru www.icq.com web interface.



 Original code by: Tomas Pokorny 
 Modified & posted by: Michal Taborsky <[email protected]>

 This function sends an ICQ message. Uses www.icq.com web interface.
  $to - ICQ UIN of recipient
	$name - name of sender
  $email - sender email
	$subject - message subject
	$body - message body


  SendICQ(12345678,"WHiZZ","[email protected]","Greeting","Hey, it works !");

function SendICQ($to,$name,$email,$subject,$body) {
  $variables = "from=".RawURLEncode($name)."&fromemail=".RawURLEncode($email)."&subject=".RawURLEncode($subject)."&body=".RawURLEncode($body)."&to=$to&Send=Send+Message";
  $request =
"POST http://wwp.icq.com/scripts/WWPMsg.dll HTTP/1.0
Referer: http://wwp.icq.com/$to
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.72 [en] (X11; U; Linux 2.2.17 i686)
Host: wwp.icq.com
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Content-type: application/x-www-form-urlencoded
Content-length: ".strlen($variables)."


    if ($fs = fsockopen("wwp.icq.com",80)) {
        fputs($fs, $request);
    } else echo "Error while connecting.";