- This topic has 2 replies, 3 voices, and was last updated 23 years, 8 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Archives › Computer Support › Online Status Indicator › Simple PHP script
Here’s a simple PHP script that I would like to share with you 🙂
Instead of having a picture saying online or offline, you could use this little code: (you can put whatever you want inside echo ” “;)
$fp = fopen(“http://213.93.110.36:8080/msn/yourlogin@hotmail.com”,”r”);
$content = fread($fp,1024);
fclose($fp);
if (eregi(‘^GIF89a’, $content)) {
echo “Kim is online right now.. You can message me by sending an instant message to yourlogin@hotmail.comnn”;
}
else {
echo “Kim is offline. You can still reach me by sending an e-mail..
“;
}
?>
Note: This script is only tested while being online, and it only works with MSN, but the code snippet should help you making your own to ICQ etc.
Ok, nice try here but this won`t work they way it should be.
The script doesn`t know what to accept as a offline or online status, in both cases u`ll always get “msnoffline.gif or msnonline.gif” back from the server (those images are default). But people are able to change those images to anything they want. (.bmp .png etc..)
It will just wait until it gets some kind of data from the service, this is also why it takes some time until the script get parsed by the server, so it would basicly always say the person is online if it doesn`t get any responce.
Keep up the good work 🙂
How did you change the output HTML? (On your site)
Mzzl, Fl4sh3r