<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.Net Geek &#187; Gtalk</title>
	<atom:link href="http://www.aakashjain.com/tag/gtalk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.aakashjain.com</link>
	<description>Technology, musings and stuff by Aakash Jain</description>
	<lastBuildDate>Thu, 11 Aug 2011 05:09:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to Create IM BOT in Minutes</title>
		<link>http://www.aakashjain.com/misc/how-to-create-im-bot-in-minutes-854</link>
		<comments>http://www.aakashjain.com/misc/how-to-create-im-bot-in-minutes-854#comments</comments>
		<pubDate>Mon, 27 Jul 2009 08:21:21 +0000</pubDate>
		<dc:creator>Aakash</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Gtalk]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[IM]]></category>
		<category><![CDATA[IM BOT]]></category>
		<category><![CDATA[Imified]]></category>
		<category><![CDATA[Open API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Twitter Bot]]></category>

		<guid isPermaLink="false">http://www.aakashjain.com/?p=854</guid>
		<description><![CDATA[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. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I created an IM BOT that works with GTalk, Yahoo Messenger, Windows Live and other popular instant messaging clients.</p>
<p>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.</p>
<p>For example, I have created a Twitter Bot that can be used to tweet in your twitter account using any IM client.</p>
<p>If you like to write a personal IM bot, just follow these simple steps:</p>
<p><strong>Step 1:</strong> Register at <a href="www.imified.com" target="_blank">Imified</a></p>
<p><strong>Step 2:</strong> Create your Bot which is just a simple script which resides on your webserver. It can be in any programming language.</p>
<p><strong>Step 3:</strong> Copy the path of your script in the clipboard shown below.</p>
<p><img class="alignleft size-full wp-image-859" title="Imified" src="http://www.aakashjain.com/wp-content/uploads/2009/07/twitter1.jpg" alt="Imified" width="564" height="115" /></p>
<p>Your Bot is ready to serve now.</p>
<p>The script I wrote is self-explanatory.<br />
<strong>Just Add Tweetbot@bot.im in your IM client to try it.</strong></p>
<pre name="code" class="php">//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;
				}

}</pre>
<p><strong>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.<br />
You can make a number of Applications using different Open APIs</strong></p>
<pre name="code" class="php">//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, <a href="http://twitter.com/'.$username.'">Check your profile</a> ";
		}
	else
		{
		 $result="Error , Username or Password is not correct ";
		}
	return $result;
}</pre>
<p>Learn How To Use <a href="http://www.imified.com/developers/api" target="_blank">Imified API</a><br />
<strong>Happy Coding!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aakashjain.com/misc/how-to-create-im-bot-in-minutes-854/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Search for Trains from Gtalk</title>
		<link>http://www.aakashjain.com/misc/indian-railway-search-trains-gtalk-352</link>
		<comments>http://www.aakashjain.com/misc/indian-railway-search-trains-gtalk-352#comments</comments>
		<pubDate>Tue, 10 Mar 2009 18:57:06 +0000</pubDate>
		<dc:creator>Aakash</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[Cleartrip]]></category>
		<category><![CDATA[Gtalk]]></category>
		<category><![CDATA[Indian Railway]]></category>
		<category><![CDATA[Online Booking]]></category>

		<guid isPermaLink="false">http://www.aakashjain.com/?p=352</guid>
		<description><![CDATA[Just explored a new added feature from Cleartrip that allows you to search for Trains from your Gtalk. Add &#8220;cleartrip.trains@gmail.com&#8221; as a friend in your Gtalk and start searching. Unlike your normal friends &#8220;cleartrip.trains@gmail.com&#8221; is a ‘Bot’ which takes command as input, execute them and return the result back to you. Say, if you want [...]]]></description>
			<content:encoded><![CDATA[<p>Just explored a new added feature from <a href="http://www.cleartrip.com" target="_blank">Cleartrip</a> that allows you to search for Trains from your Gtalk. Add &#8220;<strong>cleartrip.trains@gmail.com</strong>&#8221; as a friend in your Gtalk and start searching. Unlike your normal friends &#8220;cleartrip.trains@gmail.com&#8221; is a ‘Bot’ which takes command as input, execute them and return the result back to you. Say, if you want to search for a 3-AC train from &#8216;Mumbai&#8217; to &#8216;New Delhi&#8217; on Mar 10. You will send a message as &#8220;Mumbai New Delhi Mar 11 3A&#8221;. This will return the list of trains with related information. Kwel!. You can send &#8220;help&#8221; for other instructions.</p>
<p>I see they have put a great deal of effort to make searching for Trains (in India) a pleasure experience through their website. You need to open an online account with them and start searching and booking the trains. You can customize your search and can even see the route on map. There possibly will be other website which might be providing this type of service, but they are yet to be explored.</p>
<div id="attachment_360" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-360" title="train_route" src="http://www.aakashjain.com/wp-content/uploads/2009/03/train_route-300x245.png" alt="Train Route" width="300" height="245" /><p class="wp-caption-text">Train Route (Punjab - Mumbai)</p></div>
<p>I&#8217;ve been using the <a href="www.indianrail.gov.in" target="_blank">Indian Railway official website</a> to search and book but it seems that the private players are a step ahead to provide easy service that make sense. Here, IRCTC (read it as &#8220;Indian Railways Catering and Tourism Corporation Limited&#8221;) is doing the right thing to allow the other service providers/vendors to search through the reservation database. I’m waiting for a stiff competition between various online service providers in near future and I&#8217;m sure this will bring out something that is useful, more personalized, and easy for users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aakashjain.com/misc/indian-railway-search-trains-gtalk-352/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

