PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm messing around with trying to write a simple ICQ client
starting with a contact list
I found this code somewhere that should tell me whether I am online or not, but this doesn't work.
I imagine if i downloaded the webste of an image icon that tells if i am online or not, I can tell by the length of the image in bytes whether I am online or not. I assume that this is what this is trying to do.
I dun really want spend time socket programming for this. Is this possible any other way ?
when I'm online the request http://wwp.icq.com/scripts/online.dll?icq=151017995
redirects me to Location: /lib/image/0,,4362,00.gif.
When I'm offline to Location: /lib/image/0,,4345,00.gif
if this is valid for all users (haven't tested that) and you have access to the socket-extension the script may check that redirect.
simple and without error-handling:
ahhh .. dll must be a library (I'm relatively new to php)
yea .. I put this in and it works.
if (!dl('php_sockets.dll ')) {
exit;
}
but when I load it up from my windows OS computer to a linux server, i get :
Warning: Unable to load dynamic library '/usr/lib/php4/20010901/php_sockets.dll ' - /usr/lib/php4/20010901/php_sockets.dll : cannot open shared object file: No such file or directory in /tmp_amd/elfman/export/elfman/1/elip/public_html/icq.php on line 6
the unix/linux version of php does not use .dlls. They are called .so on thos systems. Would be best if you add the extension to php.ini (if possible).