Mailinglisten-Archive |
This is a multi-part message in MIME format.
------=_NextPart_000_005D_01BF52ED.5DFAAF60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
> Hi,
>
> gibt es eine Möglichkeit mittels PHP3 den ICQ Server abzufragen, ob ein
> bestimmter ICQ User online ist?
>
ja die gibt es, hab ein script geschrieben, siehe anhang
------=_NextPart_000_005D_01BF52ED.5DFAAF60
Content-Type: application/octet-stream;
name="status.php3"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="status.php3"
<?=0A=
/*=0A=
#########################################################################=
#####=0A=
# ICQ Status Version 1.0 =
#=0A=
# Copyright 1996-98 Garage Studios scripts_(at)_garagestudios.de =
#=0A=
# Scripts bei: http://www.garagestudios.de/php/ =
#=0A=
#########################################################################=
#####=0A=
# COPYRIGHT NOTICE =
#=0A=
# Copyright 1999-2000 Zone Scripts. All Rights Reserved. =
#=0A=
# =
#=0A=
# ICQ Status may be used and modified free of charge by anyone so long =
as #=0A=
# this copyright notice and the comments above remain intact. By using =
this #=0A=
# code you agree to indemnify Zone Scripts from any liability that =
#=0A=
# might arise from its use. =
#=0A=
# =
#=0A=
# Selling the code for this program without prior written consent is =
#=0A=
# expressly forbidden. In other words, please ask first before you try =
and #=0A=
# make money off of my program. =
#=0A=
# =
#=0A=
# Obtain permission before redistributing this software over the =
Internet or #=0A=
# in any other medium. In all cases copyright and header must remain =
intact.#=0A=
#########################################################################=
#####=0A=
=0A=
#########################################################################=
#####=0A=
# Installation =
#=0A=
#########################################################################=
#####=0A=
# The Installation is realy simple you've only to change some variables =
#=0A=
# below. #=0A=
# You can simply include the scripts by calling it via ssi on the =
folowing #=0A=
# Way: <!--#include virtual=3D"php/status.php3?5462484" --> =
#=0A=
# Also be aware that when you use SSI on a webpage you must name your =
page #=0A=
# .shtml or .shtm. =
#=0A=
# or via php: <?php $uin =3D 5462484; require("php/status.php3"); ?> =
#=0A=
# sure you have to change the 5462484 to your uin and the path to your =
#=0A=
# Enviroments. #=0A=
#########################################################################=
#####=0A=
*/=0A=
=0A=
################### Variables =
##################################################=0A=
=0A=
//What should be printed if the person is online? Here you could also=0A=
//put something like <img src=3D/image/online.gif>.=0A=
$online =3D "online";=0A=
=0A=
//if you set here an uin you do not have to set it in the url,=0A=
//if you do so you' ve to strip the #=0A=
#$uin =3D "54043923";=0A=
=0A=
//What should the script print when a person is offline?=0A=
$offline =3D "offline";=0A=
=0A=
################### No more editing is needed below this line =
##################=0A=
=0A=
//exit with the offline message if no uin is set=0A=
if(!isset($uin)){=0A=
$uin =3D $QUERY_STRING;=0A=
}=0A=
=0A=
//open the connection to the icq online check=0A=
$url =3D =
"http://online.mirabilis.com/scripts/online.dll?icq=3D".$uin."&img=3D5";=0A=
$file =3D _(at)_fopen("$url", "r");=0A=
=0A=
// Exit the Scripts with the offline message if can't open the connection=0A=
if(!$file){=0A=
die("$offline");=0A=
}=0A=
=0A=
=0A=
//get the message from the the icq online check caracter for caracter=0A=
while (!feof($file)) {=0A=
$caracter =3D fgetc($file);=0A=
$c++;=0A=
}=0A=
=0A=
//choose wich message it is and print out the offline or online message=0A=
switch($c){=0A=
case 199:=0A=
echo "$online";=0A=
break;=0A=
case 139:=0A=
echo "$offline";=0A=
break;=0A=
default:=0A=
echo "$offline";=0A=
}=0A=
=0A=
?>=0A=
------=_NextPart_000_005D_01BF52ED.5DFAAF60--
php::bar PHP Wiki - Listenarchive