How to perform X-FACEBOOK-PLATFORM and Google Talk X-OAUTH2 XMPP authentication with PHP Jaxl library

Ever since Jaxl library first introduced support for X-FACEBOOK-PLATFORM XMPP authentication mechanism, it has changed significantly. Also, Google Talk now supports OAuth 2.0 Authorization, an XMPP extension to allow users to log in using OAuth 2.0 credentials.

Both these mechanisms are a big win for XMPP developers, since real-time conversation experience can now be provided to their application users without asking them for their passwords. In this blog post, I will demonstrate how to perform X-FACEBOOK-PLATFORM and X-OAUTH2 XMPP authentication mechanism using Jaxl v3.x PHP Library.

X-FACEBOOK-PLATFORM XMPP Authentication
Here is a quick guide on how to perform X-FACEBOOK-PLATFORM XMPP authentication using xfacebook_platform_client.php which comes bundled with Jaxl v3.x examples:

  • Visit Facebook Developer Apps page and register your application
  • Once registered, visit access token tool to get required parameters to perform X-FACEBOOK-PLATFORM authentication Facebook Access Token Tool
  • Click on the debug button next to User Token and make sure xmpp_login is one of the extended permissions (scope)
  • Enter downloaded Jaxl library folder and run from command line as follows:

    $ php examples/xfacebook_platform_client.php fb_user_id_or_username fb_app_key fb_access_token

You can now take the source code of xfacebook_platform_client.php and customize it for your application needs.

Google Talk X-OAUTH2 XMPP Authentication
Here is a quick guide on how to perform Google Talk X-OAUTH2 XMPP authentication using xoauth2_gtalk_client.php which comes bundled with Jaxl v3.x examples:

  • Visit Google OAuth Playground and input https://www.googleapis.com/auth/googletalk as the required scope. Press “Authorize API” and then “Allow Access” button on the redirected page
  • In step 2, simply press “Exchange authorize code for tokens” and copy the access token
  • Enter downloaded Jaxl library folder and run from command line as follows:

    $ php examples/xoauth2_gtalk_client.php [email protected] access_token

You can now take the source code of xoauth2_gtalk_client.php and customize it for your application needs.

Wasn’t that simple 🙂

How to use JAXL (Jabber XMPP Library in PHP) to import Gtalk contacts of any user

JAXL is an open source Jabber XMPP Client library written in PHP. It provides a self titled class JAXL which implements XMPP protocol. It can be extended to write custom event handler for every message or presence received. Developers are using JAXL for developing real time applications. Checkout 5 exciting gaming bots you can make using JAXL.

However one thing which goes un-noticed is that JAXL can also be used to import Gtalk contacts of any user. This is infact one of the very first thing which JAXL class do, after successful authentication with the Gtalk servers i.e. import the authenticated user contact list. In this blog post I will demo a sample script to import any user contact list from google servers.

Importing Gtalk contacts using JAXL

  1. Download and extract jaxl-1.0.4.rar
  2. Edit config.ini.php and update credentials of the user whose contact list we are trying to import:
      $key = array("prod"=>array("user"=>"mailsforabhinav",
                                 "pass"=>"xxxxxx",
                                 "host"=>"talk.google.com",
                                 "port"=>5222,
                                 "domain"=>"gmail.com"
                                ),
    
  3. Open jaxl.class.php and modify the code as below:
        function setStatus() {
          // Set a custom status or use $this->status
          $this->sendStatus($this->status);
          print "Setting Status...n";
          print_r($this->rosterlist); // Print the contact list on the console
          print "Donen";
          exit;
        }
    
  4. Finally run from command line to retrieve gtalk contacts of the authenticated user.
    php index.php

One can easily modify the above code to save user contacts in a database.
Also one can echo json_encode($this->rosterlist) in response to an Ajax call from the browser.

Enjoy and leave your comments.

How to broadcast a message to your Gtalk friends using JAXL?

In this era of social media we all look forward to easy and utility tools to easily market our site and blogs. In this post I will demonstrate a ready to use script, which will help you broadcast your message to everyone on your gtalk friend list in one go.

jaxl4broadcast.class.php
jaxl4broadcast.class.php is an extension of JAXL library. This extension simply saves all your buddy list in an array while connecting with Gtalk servers, and then send out your custom message to all of them in one go. The code that will do the task:

    function setStatus() {
      $this->sendStatus($this->status);
      print "Setting Status...n";
      print "Donen";

      foreach($this->rosterList as $buddy) {
        print "Sending message to ".$buddy."n";
        $this->sendMessage($buddy,"Message broadcasted using *JAXL Library http://code.google.com/p/jaxl*");
        sleep(1);
      }

      /* Now loggout of the system */
      exit;
    }

PS: You need to checkout the latest version of xmpp.class.php for jaxl4broadcast.class.php to work. jaxl-1.0.4 doesn’t include the latest checked in xmpp.class.php

Using jaxl4broadcast.class.php

  • Checkout the latest version of JAXL library from here
  • Open config.ini.php, replace myproductionuser => gmail id and password => gmail password
  • Open index.php, replace jaxl.class.php => jaxl4broadcast.class.php
  • Open command line window (for windows) and shell prompt (for *nix). Navigate to the checked out directory
  • From command prompt run php index.php
  • If everything goes alright, you will see something like the image below
  • See list of known issues if you are new to JAXL and having trouble

jaxl4broadcast

Other JAXL Extensions you may want to checkout:

Happy Broadcasting!

Programatically control your google mails using JAXL v 1.0.4

Google has released an API for almost all of their products including maps, feedburner and gadgets. However one of the API’s which every developer would have loved to make use of is “Google Mail API” which is still missing (available for premium google apps user only). Here in this post I would demonstrate how one can programatically control his/her google mails using JAXL without being a premium user of google mail account.

For those who have landed on this post straight and have little knowledge about what JAXL is “JAXL stands for Jabber XMPP Library and for fun you may call it Just Another XMPP Library. It is written in PHP and can be downloaded from http://code.google.com/p/jaxl“. To know more about JAXL, read the introductory post here. If you want to dig deep and know how JAXL works, read the gtalk case study here. Finally, after reading this post you may also want to check how you can fetch any social networking feed right into your gtalk messenger using JAXL.

Version 1.0.4 of JAXL included support for “Gmail Notification Extension of XMPP“. If you are a daily Gtalk user like me, then you have surely seen this extension in action. Just recall Gtalk notifying you of a new mail in your inbox, through a pop-up in the bottom right corner. Also those who see this in action everyday will agree with me that this notification comes even before the mail has actually appeared in you inbox. Simply because of the PUSH technology used by XMPP protocol.

So why would you in first place be interested in accessing your google mails programatically. A quick thought on this brings me to the following real life scenarios:

  • Suppose your are out of vacation and you want to set a custom auto-reply message for your family and friends, while you want to set a general out-of-office message for your colleagues. The limitation in gmail is that you can’t really do this. Further in this post, I will show you how can you achieve this using JAXL.
  • Suppose you are a google app user and your company has organized an online programming contest. Further you want to mail each question to the contestants only if they has answered the previous question. JAXL provide you a way to access key information about your incoming mails like: sender email id, subject, number of threads in the mail, time at which mail was sent, mail url and mail snippet. Which is enough for you to code a bot which can check for incoming mail and then send in next question to the contestant who sent this mail
    1. Further there can be a thousand use cases where you would you like to have such a control over you google mails but before discussing them, lets see a demonstration on how can we use JAXL to achieve this.

      Sending Custom Auto-Reply Mails using JAXL
      Along with extendable functions like eventMessage() and eventPresence(), JAXL’s latest version now also provide another extendable function called eventNewEMail(). So everytime you receive a new mail(s) in your google account, the control is passed to this function along with all informations about the incoming mails.

      Various data passed to this function are:

      • $total: Tells you about total number of unread mails.
      • $thread: The thread id of all the unread threads. Note: In Gmail you have threads in your inbox which can contain more than a single mail.
      • $url: The mail.google.com url for the new mail
      • $participation: This can be 0, 1 or 2. 0 indicates that you have not participated, 1 indicates that you are one of the many recipients and 2 indicates that you are the sole recipient for messages in this thread
      • $message: The number of messages in the thread. For instance you can have more than one unread mail in a thread.
      • $date: A timestamp of the most recent unread message, in milliseconds since the UNIX epoch
      • $senders: Email Id of all the senders in the current thread
      • $labels: Label if any to which this mail thread belongs to
      • $subject: The subject of the mail threads
      • $snippet: The mail snippet of the incoming mail

      So thats a lot of information really, with which we can automate things to a certain extent. Lets see how I use it to send custom auto-reply mails when I am out on vacation. Here is the extendable jaxl class for gmail:

      jaxl4gmail.class.php (Download)

        /* Include PHP Mailer Class */
        include_once("class.phpmailer.php");
      
        /* Include XMPP Class */
        include_once("xmpp.class.php");
      
        class JAXL extends XMPP {
      
          /* Define custom mail groups */
          var $family = array("[email protected]","[email protected]");
          var $colleague = array("[email protected]","[email protected]");
      
          /* Define custom mail subject and message */
          var $familySubject = "Hi, Will get back to you";
          var $familyMessage = "Hey, I am currently out on vacation at my grannies house in Delhi. I will return back home by next monday.
      Reach out to me at +91-987654321.

      With Love,
      Abhinav Singh"; /* Define custom mail subject and message */ var $colleagueSubject = "[Auto-Reply] Out of Office"; var $colleagueMessage = "Hi, I am on vacation in my village with very limited access to internet and phone. I will return back home by next monday.

      Regards,
      Abhinav Singh"; function eventMessage($fromJid, $content, $offline = FALSE) { } function eventPresence($fromJid, $status, $photo) { } function eventNewEMail($total,$thread,$url,$participation,$messages,$date,$senders,$labels,$subject,$snippet) { // We only want to send auto-reply message to latest sender $sender = $senders[0]; // Check if the user lie in any category, and send appropriate mail if(in_array($sender["address"],$this->family)) { $mail = new PHPMailer(); $mail->From = "[email protected]"; $mail->FromName = "Your Name"; $mail->Subject = $this->familySubject; $mail->MsgHTML($this->familyMessage."

      Powered by Jaxl http://code.google.com/p/jaxl"); $mail->IsHTML(true); $mail->AddAddress($sender["address"],$sender["name"]); if(!$mail->Send()) $this->logger->logger("Error occured while sending mail to ".$sender["address"]); else $this->logger->logger("Mail sent successfully to ".$sender["address"]); } else if(in_array($sender["address"],$this->colleague)) { $mail = new PHPMailer(); $mail->From = "[email protected]"; $mail->FromName = "Your Name"; $mail->Subject = $this->colleagueSubject; $mail->MsgHTML($this->colleagueMessage."

      Powered by Jaxl http://code.google.com/p/jaxl"); $mail->IsHTML(true); $mail->AddAddress($sender["address"],$sender["name"]); if(!$mail->Send()) $this->logger->logger("Error occured while sending mail to ".$sender["address"]); else $this->logger->logger("Mail sent successfully to ".$sender["address"]); } else { // Do nothing, will handle later on $this->logger->logger("No handler for this email id..."); } } function setStatus() { print "Setting Status...n"; $this->sendStatus("Available"); print "Requesting new mails...n"; $this->getNewEMail(); print "Donen"; } }

      The only variables you would like to change in above class are:

      1. $family : An array of email id of your family member
      2. $colleague : An array of email id of your colleagues
      3. $familySubject : Subject with which you want to send mails to your family members
      4. $familyMessage : Mail message which you want to send to you family
      5. $colleagueSubject : Subject with which you want to send mails to your colleagues
      6. $colleagueMessage : Mail message which you want to send to you colleagues

      For further customization, you may want to add more groups and their respective subjects and messages.

      Further you may want to create your own custom bots using JAXL for one of the other use case described above. Join official JAXL Google Group for future updates and enhancements.

      Do let me know if you build any custom bot using JAXL, I will be more than happy to list your bot on official JAXL google code page.

      Enjoy!

How to get dzone feeds as IM using JAXL? Add [email protected]

The most funny part of knowing XMPP protocol is that you can execute all your daily web needs using it. Be it playing anagram online or achieving your status messages. And your life gets easy if you are using an XMPP Client Library like JAXL.

Here I have tried to create a simple bot which allows you to read newest links posted on dzone category wise. Simply add [email protected] in your gtalk messenger and start by typing options.

Available options are:

  • frontpage: Will send you latest links on frontpage.
  • queue: Will send you latest links in queue.
  • tag: Send in a tag e.g. php,java,xml and you will get latest links for the particular tag

Here is modified eventMessage() method of JAXL library powering [email protected]:

    function eventMessage($fromJid, $content, $offline = FALSE) {

      // If the message is not an offliner
      if(!$offline) {
        if($this->restrictJid && !in_array($this->getBareJid($fromJid),$this->authorizedJid)) { // Block un-authorized users
          $this->logger->logger($fromJid." tried using this service by sending:n".$content);
          $message = 'You are not authorized to use this service';
          $this->sendMessage($fromJid,$message);
          return TRUE;
        }
        else {
          $content = strtolower(trim($content));

          // Build RSS Feed URL depending upon passed IM
          if($content == "options") {
            $message = "Available options are:n";
            $message .= "*1. frontpage:* Will send you latest links on frontpage.n";
            $message .= "*2. queue:* Will send you latest links in queue.n";
            $message .= "*3. tag:* Send in a tag e.g. php,java,xml and you will get latest links for the particular tagn";
            $this->sendMessage($fromJid,$message);
            return TRUE;
          }
          else if($content == "frontpage") $url = "http://www.dzone.com/links/feed/frontpage/rss.xml";
          else if($content == "queue") $url = "http://www.dzone.com/links/feed/queue/rss.xml";
          else $url = "http://www.dzone.com/links/feed/frontpage/".$content."/rss.xml";

          // Generate cache file location
          $cache_file = "cache/dzone/".md5($url)."-".$content.".rss";

          // If cache file is not older than 900 seconds (15 min)
          if(file_exists($cache_file) && (filemtime($cache_file) > time() - 900)) {
            $this->logger->logger("RSS already found cached...");
          }
          else { // else fetch a fresh copy of RSS
            $this->logger->logger("Fetching RSS for url:n".$url);
            $head = $this->fetchWebURL($url);
            if($head['errno'] == 0 && $head['http_code'] == 200) {
              $this->logger->logger("Fetched successfully...");
              $data = $head['content'];
              $fh = fopen($cache_file,"w");
              fwrite($fh,$data);
              fclose($fh);
            }
            else {
              // Send a message saying no such feed exists
              $this->logger->logger("Failed to fetch the RSS feed...");
              $message = 'No feed exists for the passed keyword: '.$content;
              $this->sendMessage($fromJid,$message);
              return TRUE;
            }
          }

          // Parse RSS Feed
          $r = &new XML_RSS($cache_file);
          $r->parse();
          $NumberOfFeeds = count($r->getItems());
          if($NumberOfFeeds > 0) {
            $message = '';
            foreach($r->getItems() as $key => $item) {
              if($this->count < $this->maxResults) {
                $message .= "*".$item["title"]."*n";
                $message .= $item["link"]."n";
                $message .= $item["description"]."nn";
                $this->count++;
              }
              else {
                break;
              }
            }
            $message .= "powered by *Jaxl* http://code.google.com/p/jaxl"."nn";
            $this->sendMessage($fromJid,$message);
            $this->count = 0;
            return TRUE;
          }
          else {
            // Send a message saying no feed found
            $message = 'No feed was found for passed keyword: '.$content;
            $this->sendMessage($fromJid,$message);
            return TRUE;
          }
        }
      }
      else {
        // Send an appropriate message
        $this->logger->logger($fromJid." sent an offliner saying:n".$content);
        return TRUE;
      }
    }

To run this sample application you need:

  • JAXL Library (http://code.google.com/p/jaxl)
  • XML_RSS Package (pear install XML_RSS)
  • Create a directory cache/dzone where this application will cache all rss files
  • Include jaxl4dzone.class.php in index.php, instead of jaxl.class.php and run ‘php index.php’ from command line to start this application

Checkout the complete code and JAXL library from http://code.google.com/p/jaxl.

Now browse new links even when dzone is down for maintenance 😛
Do let me know about your feedbacks 🙂

Introducing JAXL – Open Source Jabber XMPP Library

Introduction

JAXL stands for “Jabber XMPP Library“. For fun, it stands for “Just Another XMPP Library

This library currently supports following features:

  • Connect to a Jabber Server (e.g. Gtalk)
  • TLS Encryption
  • DIGEST-MD5 and PLAIN authentication mechanisms
  • Roster Support

Library comes with the following class files:

  1. config.ini.php : Holds your jabber account and mysql connection information
  2. mysql.class.php : Basic MySQL connection class used to insert received messages and presence into MySQL database
  3. logger.class.php : A very basic logger class which allows you to log all XML stanza’s send and received from jabber server
  4. xmpp.class.php : Base XMPP class library which implements the XMPP protocol
  5. jaxl.class.php : JAXL class which extends XMPP class library. Should be the starting point for your application.
  6. index.php : After building your application in jaxl.class.php, you finally initializa and call your methods here

Source Code
JAXL is hosted at Google Code. Checkout full source code from here:
http://code.google.com/p/jaxl

Google Groups
jaxl
Visit this group

How to use JAXL:
JAXL Client Library is highly structured. There is a base XMPP class library (xmpp.class.php) and a JAXL class library (jaxl.class.php) which is derived from the base XMPP class library.

Base XMPP class library implements the XMPP protocol and it also provides you with two extendable methods named eventMessage() and eventPresence(). These methods are internally called when a message or presence XML Stanza is received from the Jabber server.

Jaxl.class.php must be the starting point for all your applications. Simply customize the eventMessage() and eventPresence() Method for your application. Other methods which might interest you while customizing them are:

  1. sendMessage($jid,$message) : For sending message to a particular Jid
  2. sendStatus() : To set your status message
  3. roster(‘get’) : To get list of roster
  4. roster(‘add’,$jid) : Add a new contact in roster list
  5. roster(‘remove’,$jid) : Remove a contact from roster list
  6. roster(‘update’,$jid,$name,$groups) : Update a particular contact in roster
  7. subscribe($jid) : Subscribe for presence of a particular $jid

This library includes the following files:

Config File (config.ini.php)
You specify all your jabber account username and password in this file. For development environment keep $env = “devel” and for production simply change it to $env = “prod”

  // Set an enviornment
  $env = "prod";

  // Log Level for logger class
  $logEnable = TRUE;

  // Log in MySQL database
  $logDB = FALSE;

  $key = array("prod"=>array("user"=>"myproductionuser",
                             "pass"=>"password",
                             "host"=>"talk.google.com",
                             "port"=>5222,
                             "domain"=>"gmail.com"
                            ),
              "devel"=>array("user"=>"mydevelopmentuser",
                             "pass"=>"password",
                             "host"=>"localhost",
                             "port"=>5222,
                             "domain"=>"localhost"
                            )
              );

  $db = array("prod"=>array("dbuser"=>"root",
                            "dbpass"=>"password",
                            "dbhost"=>"localhost",
                            "dbname"=>"jaxl"
                           ),
             "devel"=>array("dbuser"=>"root",
                            "dbpass"=>"password",
                            "dbhost"=>"localhost",
                            "dbname"=>"jaxl"
                           )
             );


MySQL Class (mysql.class.php)
This is a basic MySQL connection class used to insert received messages and presence into MySQL database

Base XMPP Class (xmpp.class.php)
You should not worry about this class. Until and unless you are aware of what are you trying to achieve you should not touch this class file.

Logger Class (logger.class.php)
This is a basic logger class. It help you log XML send to and received from jabber server. Might prove helpful in debugging and if you are interested in learning the core of XMPP Protocol.

Extended JAXL Class (jaxl.class.php)
You will be customizing eventMessage() and eventPresence() methods here.

    function eventMessage($fromJid, $content, $offline = FALSE) {
      if($offline) {
        $this->sendMessage($fromJid,"Hi, Thanks for your offline message");
      }
      else {
        $this->sendMessage($fromJid,"Hi, Thanks for your message");
      }

      if($this->logDB) {
        // Save the message in the database
        $timestamp = date('Y-m-d H:i:s');
        $query = "INSERT INTO message (FromJid,Message,Timestamp) value ('$fromJid','$content','$timestamp')";
        $this->mysql->setData($query);
      }
    }

    function eventPresence($fromJid, $status, $photo) {
      // Change your status message to your friend's status
      $this->sendStatus($status);

      if($this->logDB) {
        // Save the presence in the database
        $timestamp = date('Y-m-d H:i:s');
        $query = "INSERT INTO presence (FromJid,Status,Timestamp) value ('$fromJid','$status','$timestamp')";
        $this->mysql->setData($query);
      }
    }

In above example I have done 4 things:

  • Sends back a message saying “Hi, Thanks for your offline message”, when I receive a offliner.
  • Sends back a message saying “Hi, Thanks for your message”, when I receive an IM from my friend.
  • Change my status message, as and when I receive a status update from my friends.
  • Save messages and presence into database if $logDB = TRUE in config.ini.php

Final Call (index.php)

  /* Include Key file */
  include_once("config.ini.php");

  /* Include JAXL Class */
  include_once("jaxl.class.php");

  /* Create an instance of XMPP Class */
  $jaxl = new JAXL($key[$env]['host'],    // Jabber Server Hostname
                   $key[$env]['port'],    // Jabber Server Port
                   $key[$env]['user'],    // Jabber User
                   $key[$env]['pass'],    // Jabber Password
                   $key[$env]['domain'],  // Jabber Domain
                   $db[$env]['dbhost'],   // MySQL DB Host
                   $db[$env]['dbname'],   // MySQL DB Name
                   $db[$env]['dbuser'],   // MySQL DB User
                   $db[$env]['dbpass'],   // MySQL DB Pass
                   $logEnable,            // Enable Logging
                   $logDB                 // Enable MySQL Inserts
                  );

  try {
    /* Initiate the connection */
    $jaxl->connect();

    /* Communicate with Jabber Server */
    while($jaxl->isConnected) {
      $jaxl->getXML();
    }
  }
  catch(Exception $e) {
    die($e->getMessage());
  }

Instant Messenger Powered by JAXL
I am pleased to announce 3 months after release of JAXL, 1st Instant Messenger powered by JAXL. Currently the instant messenger is in testing phase and will be released after some 3-4 weeks of thorough testing. Meanwhile here is the first clip shot:

Disclaimer
Currently this library is being developed and used at Gtalkbots.com . Though it is thoroughly tested and being used, I still recommend not to use it on production servers. Mainly, since it is heavily customized for Gtalkbot’s usage. I am releasing it, as I see it of use for the community worldwide. If you want to use it, use at your own risk. Let me know of any changes you make to this library. In future I look to make this library more generic.

Enjoy and let me know of any bugs, feedbacks, enhancements or any abuse you may want to pass through if it doesn’t work for you 😛

You should be running index.php using command line and not browser (recommended). This class is currently highly customized for Gtalkbots usage and works perfectly with Gtalk Servers.

[email protected] – Online gaming enabled on Gtalk

Anagram, many of you might be familiar with it or even played many a times back in school and colleges. Its a simple text based game, where you are given a jumbled word and you need to re-arrange it. E.g. You will be given huldos and you need to quickly identify that as should.

So getting bored back in college or office, add [email protected] and type anagram to start gaming. Play and score well. Your score will turn up on the Gtalkbots front page. They have kept this game open for the world i.e. one can play this game even without registering at Gtalkbots.

A few important points:

  1. Add [email protected] as your friend in Gtalk Messenger.
  2. Type rules to read them before you start gaming.
  3. Type anagram to start gaming.
  4. You will be given a jumbled word which you needs to rearrange and reply back.
  5. If your answer is correct you get 10 Points.
  6. If your answer is not correct and you are finding it tough to solve it, Type hint to get a clue, and a clue will be sent to all users playing the game.
  7. DO NOT FORGET to type exit when you are finished gaming. If you forget to do so, you will be considered as a part of next round being played and eventually your average score decreases.
  8. If total number of wrong answers = 5 (including all users), the bot will automatically reply back with correct answer and moves to the next word.

So try out and enjoy.

Save your and your friend’s status messages. Share and promote your website through your status

Hello Everyone,

http://gtalkbots.com

Here is this new website which help you save your and your friends Gtalk status messages. It also provides a social bookmarking feature with a different edge.

Are you fed up with posting your website and blogs at digg.com, delicious, stumble or any other such site there. If not, you must surely be fed up with the hard work you need to do to make sure your link reach out to millions out there. Well through this site, you just need to put your blog and site link as your gtalk status message and this site will  make sure it reaches to the relevant audience out there without any sweat from your.

Try out, promote, enjoy, comment and let me know your feedbacks.

GTalk Status Message Collector

Hello Everyone,

I have started http://gtalkbots.com , based on the example demonstrated here. Try out and Help spreading the word.

I am not a big fan of twitter, but after I heard they do something similar to what I will be demonstrating here. I thought of building this one out. So here is my demo application, also known as GTalk Chat Bot.

Do the following things to get started:

  1. Add [email protected] in your GTalk Messenger.
  2. It will collect your status messages as and when you change them.
  3. You can view all your status messages by visiting this URL : http://abhinavsingh.com/webdemos/chatbot/
  4. The status messages will reflect at the above URL by the end of the day. (I had to do this because the server where I have my bot running i.e. my VPS is different from where my personal site is hosted, hence we have this restriction)
  5. Come back anytime after a day and you can see your status messages over time.

I am currently testing this application, which is running 99.99% bug free. Once I am satisfied with it, I will put the code for download with a possible explaination.

Meanwhile enjoy the bot.

Thanks.

Critical Bug in Gmail integrated Chat

Well chat is a part of our day to day life (I use Gtalk). While chatting with my friends today who were using gmail integrated chat, I noticed that they were going offline every 2-3 minutes. Finally thanks to Sowmya Sudha, who came up with this critical bug in Gmail integrated chat. Here is what exactly happens when you chat using Gmail integrated chat:

Step 1: You open up a chat window to start chatting

Step 2: Pop out the chat box to get more space for writing and reading messages

Step 3: Now for some reason you decide to popin or close the poped out chat

And Bingo!

Your browser goes for a roll. Tested on Firefox and Flock. Surely will be same on Internet Explorer.

After failing to handle orkut apps efficiently, this is the second time I am seeing any critical bug from google. Are we going to see a downfall in google’s standards ??

Try out yourself.