Creating an IM bot

I am trying to create an IM bot and I could not find the necessary resources.


UPDATE

There was a problem with Imified that makes galk bots not appear on the Internet (and without reacting), now it works, so I close it.

This tutorial works.


The original question is not deleted for reference purposes.

Firstly, I found a great tutorial on How to write your own IM browser , but it uses the IMified platform that looks dead (last blog post on septembre 2008, no feedback on their help forum ...).

I managed to create a beta bot using their service, but, as I can see on the forum, it will never be online.

So, did anyone succeed?

Notes

I am looking for something that would be:

  • Free
  • Works with PHP * or some free hosting solution (e.g. IMified, but it works).
  • Works for Google Talk (I care).

Of course, send answers about any solution that does not meet these criteria, it can help.

* I have Linux hosting on GoDaddy

+6
bots instant-messaging
source share
2 answers

Taken from the textbook in case it ever disappears:

Step 1 Go to imified.com and request an invitation. You should also give your bot a decent name, because you can only have one bot per email address.

Step 2 : The email with the secret key should appear in your inbox the next minutes. Copy this key to the clipboard and go here to redeem the key.

Step 3 : now it's time to create a bot, which is actually a simple script that resides on your public web server. It can be in PHP, Perl, Python or any other language. More details here.

This is the source of the PHP script that I wrote for labnol IM bot - quite understandable - it reads your message, receives the corresponding data from Google Suggest and echoes it in the chat window.

<?php // Get all the related keywords from Google Suggest $u = "http://google.com/complete/search?output=toolbar"; $u = $u . "&q=" . $_REQUEST['msg']; // Using the curl library since dreamhost doesn't allow fopen $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $u); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $xml = simplexml_load_string(curl_exec($ch)); curl_close($ch); // Parse the keywords and echo them out to the IM window $result = $xml->xpath('//@data'); while (list($key, $value) = each($result)) { echo $value ."<br>"; } ?> 

Step 4 Once your script is ready, put it somewhere on your web server and copy the full URI to the clipboard.

Now log in to your fake account, paste the URL script and add that im bot is a list of your friends. What is it.

+1
source share

Google Talk uses jabber, where the protocol is called XMPP . A google quick search for "xmpp bot php" brought me here . Should this be enough for a start?

+4
source share

All Articles