A PHP implementation of the AIM protocol. This library allows you to connect to the AIM servers, send messages, and perform almost any functionality of the AIM service. This is very simialar to the Perl module NET::AIM.
Download at http://sourceforge.net/projects/phptoclib
Please feel free to post bugs, send feedback, etc (This library is still very under development).
I would highly suggest checking out the newer version released, or the CVS version, both offer many improvements.
Update: Beta 1 has been released, and it works nicely! So download it and check it out!
By : pickleman78
----Example file testscript.php. Also included in library download ------
<?php include "aimclassw.php"; include "parsemsg.inc.php"; //make a new AIM object $b=new Aim("screenname","password",4); //Sign on to the server $b->signon();
//Loop forever echo("Starting forever loop"); while(1) { //Read the incoming from AIM $in=$b->read_from_aim(); //echo($in); $command=msg_type($in); $info=msg_parse($command);
if($command['type'] == AIM_TYPE_MSG) { //Send their message back to them in reverse $message=strip_tags($info['message']); if(strlen($info['message'])>0) $b->send_im($info['from'],strrev($message)); $info['message']=''; $info['from']=''; $message=''; } else if($command['type'] == AIM_TYPE_WARN) { if($info['from']) $b->warn_user($info['from']); $b->setWarning($info['warnlevel']); } }
?>
----End example code ----------
This code allows you to set up very basic functionality. It signs a user on, and returns all messages it receives in reverse. It also warns a user back when warned.
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.