Jul 27
VN:F [1.6.7_924]
Rating: 5.7/7 (3 votes cast)

Recently I created an IM BOT that works with GTalk, Yahoo Messenger, Windows Live and other popular instant messaging clients.

To create your own IM Bot you need to have some very basic programming skills. You can use any programming language, I prefer PHP. You also need to have web space to host your bot.

For example, I have created a Twitter Bot that can be used to tweet in your twitter account using any IM client.

If you like to write a personal IM bot, just follow these simple steps:

Step 1: Register at Imified

Step 2: Create your Bot which is just a simple script which resides on your webserver. It can be in any programming language.

Step 3: Copy the path of your script in the clipboard shown below.

Imified

Your Bot is ready to serve now.

The script I wrote is self-explanatory.
Just Add Tweetbot@bot.im in your IM client to try it.

//Twitter.PHP
require('TwitterAPI.php');

if($_REQUEST[('value'.($_REQUEST['step']-1))]=="reset")
{
	echo " start all over again now ";
}

else if($_REQUEST[('value'.($_REQUEST['step']-1))]=="?")
{
	echo " Hi, I am a Twitter Bot, you can tweet and see friend's timeline using me.
 type 'reset' to start again at any stage.";}

else{

	switch ($_REQUEST['step'])
			{
				case 1:
				echo "Enter Twitter UserName:";
				break;

				case 2:
				echo $_REQUEST['value1'];
				echo ",Enter Your Password, dont worry I dont store your password:";
				break;

				case 3:
				echo "Thankyou for submitting details
                                        Type 'tweet' to post a tweet and 'friend' to see friend's timeline";
				break;

				case 4:
				if (trim($_REQUEST['value3']," ")=="tweet")
				{
					echo "Enter Message to tweet";
				}

				else if($_REQUEST['value3']=="friend")
				{
					echo "I am working on this function, will publish it soon";
				}
				else
				{
					echo "enter correct choice ";
				}
				break;

				case 5:
				$result=tweet($_REQUEST['value1'], $_REQUEST['value2'], $_REQUEST['value4']);
				echo $result;
				}

}

No, This is not the only code you require. We need to use Twitter API as well, I have put that code in a seprate file.
You can make a number of Applications using different Open APIs

//TwitterAPI.php
function tweet($username,$password,$message)
{

// The twitter API address
$url = 'http://twitter.com/statuses/update.xml'; 

// Set up and execute the curl process
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password"); 

$resultArray = curl_getinfo($curl_handle);

    curl_close($curl_handle);

    if($resultArray['http_code'] == "200")
		{
    $result="Yipee, Check your profile ";
		}
	else
		{
		 $result="Error , Username or Password is not correct ";
		}
	return $result;
}

Learn How To Use Imified API
Happy Coding!

Tagged with:
Mar 22
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

This is kind of funny video I encountered but still Twittering is the buzz word among web communities.

Tagged with:
Mar 21
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

Twitter Twitter Bird Twitter 3rd Birthday

It’s Twitter’s 3rd birthday. Happy Birthday Twitter!

Twitter reportedly grown over 1300% last year (reported on Mashable). Now this Micro blogging service is everywhere. It’s fun, easy and more useful with over 100s of applications supporting it.

Keep going and growing. :-)

Photo: Courtesy of productivedreams
Tagged with:
Mar 21
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)

Hey, this is really strange issue I faced today. I don’t know if it happens to anyone out there, but I guess this is a Bug with Twitter. I was playing around with my account when I changed my user name from “aakash” to “Aakash”. Curiously, I tried to create a new user as “aakash” in twitter with my other email-id. To my surprise, it was created successfully. WTH ! This means I was having two different accounts “aakash” and “Aakash”. A got a mail from Twitter that confirmed the successful creation of this new Id. Just to dig it deep, I tried to logout and login again and play more but then it failed to login my newly created account. I was not able to login into any of the both account and that moment I feel that I will lost all my updates and followers. Finally, I have to use “forget password link” (my email address and ph. number) to recover my password for my original account. Now I am using my email id to login as username doesn’t work. I am not sure if it happens due to delay in update in databases between servers. I would like if you could try it on your end too and let me know your experience. If it is a Bug then it need a fix.

Tagged with:
preload preload preload