Hej jag undra om någon vet hur man gör en icq grej som kollar om man är online på icq ja ni vet.
Jag har varit på wf script och hittat det här :
<?
/* a collection of ICQ services - code by Johan Bergström'2001 [mt00jbe@student.bth.se] */
function sendICQ($uin, $name, $email, $subject, $body)
/* function for sending an pager message to a ICQ UIN
* @param:
* $uin = target UIN
* $name = sender's name
* $email = sender's email
* $subject = pager subject
* $body = pager content
*/
{
$name = urlencode($name);
$email = urlencode($email);
$subject = urlencode($subject);
$body = urlencode($body);
$icqURL = "http://wwp.mirabilis.com/scripts/WWPMsg.dll?subject=$subject&to=$uin&from=$name&fromemail=$email&body=$body";
if((fopen($icqURL , "r")))
{
return "the message was sent successfully";
}
else
{
return "an error occured.";
}
fclose($icqURL);
}
function checkICQStatus($uin, $type)
/* gets the icq status for a ICQ UIN
* @param:
* $uin = target UIN
* $type = return typ, 1 = text, 2 = values | return val: [-1 = error, 0 = offline, 1 = online, 2 = disabled]
*/
{
$arr = @file("http://wwp.icq.com/scripts/online.dll?icq=$uin&img=1");
$len = strlen($arr[1]);
if($type == 2)
{
$ret = -1;
if ($len == 105) $ret = 1;
if ($len == 18) $ret = 2;
if ($len == 0) $ret = 0;
}
else
{
$ret = "error";
if ($len == 105)$ret = "online";
if ($len == 18) $ret = "disabled";
if ($len == 0) $ret = "offline";
}
return $ret;
}
?>
men det fungerar inte vet någon vad felet är?