Login   Register  
PHP Classes
elePHPant
Icontem

File: testscript.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jeremy B  >  PHP TOC Library  >  testscript.php  >  Download  
File: testscript.php
Role: Example script
Content type: text/plain
Description: Working example bot
Class: PHP TOC Library
Connect to AIM network with the TOC protocol
Author: By
Last change:
Date: 10 years ago
Size: 462 bytes
 

Contents

Class file image Download
<?php

include("aimclassw.php");

$b = new Aim("SCREEN NAME","PASSWORD",4);

$b->registerHandler("IM_IN2","ImINHand");
$b->signon();
$b->update_profile("",true);
while(
1)
{
    
$b->recieve();
    
$b->myLastReceived="";
}

function 
ImINHand($message)
{
    global 
$b;
    
$info=msg_parse(msg_type($message));
    
$info['message']    =strip_tags($info['message']);
    
$b->send_im($info['from'],strrev($info['message']));
    
sEcho("Got an incoming IM!");
}
    
?>