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:

  • [email protected] (Source Code)
  • Sending custom out-of-office mails in Gmail (Source Code)

Happy Broadcasting!

Konami Code on Facebook : How to implement it on your site

Yesterday while chatting with friends, I discovered an unusual thing on facebook. Unusual because I didn’t see any sense in what I saw back then. The process to discover this unusual thing is as follows:

How to view lens flare on facebook
1. Login to facebook.com
2. Click once anywhere on your home page
3. Click the following sequence of characters using your keyboard
4. Up, Up, Down, Down, Left, Right, Left, Right, B, A, Enter Key
5. Click again on the page or try to scroll the page up or down

If everything is done correctly you will see something like this:
lensflare on facebook

On more investigation I found out this unusual thing is nothing but “Konami Code“, which is a cheat code that appears in many Konami video games. The Konami code was introduced to many gamers in the 1988 NES version of Contra. Due to the game’s intense difficulty, many Contra players became reliant on the cheat code, which increased the player’s lives from 3 to 30 (9 to 90 including continues), to finish the game. The game’s popularity, combined with the near-necessity of using the code, made it renowned to an entire generation of video game players. This led to the code being used in countless games, and even mentioned across popular culture.

Once the cheat code is entered, facebook extends it to enable Lens Flare on all the pages you visit thereafter. You can use the below code, to enable-disable komani code on your site, and thereafter extend it to anything you want to:

  <head>
    
  </head>
  <body onload="$.init()" onkeydown="$.konamiCode(event)">
  </body>

Try out once on facebook and then come back to grab it for your site.
Enjoy!

Goa Trip – Beer, Beach and Dirty Dancing

4 years and finally I had a long and wonderful vacation. Our (me and Sowmya‘s) last vacation was way back in 2005 to shillong and since then I have always said a big NO to all her planning. At times due to my workaholic nature and most of the times due to my laziness. However this time around I was given a surprise one fine sunday, when she told me “We (me, Sowmya, Ashna and Sashi) are going to Goa next weekend”.

Day 0: Thursday, 30th April 09

Guitar breaks in the bus As it proved out, planning well in advance will save you a lot of money and energy. All thanks to Sowmya, Ashna and Sashi who planned out every thing well in advance. They booked a sleeper bus to Goa (there is no trains from bangalore to goa on thursday’s). It was our first experience in a sleeper bus which ultimately turned out into a nightmare. Initially we liked the cozy comfort of a double bed inside the bus, but thanks to numerous speed breakers which spoiled the journey to Goa.
Sleeper Bus: INR 900 per person

Day 1: Friday, 1st May 09

We finally landed in Panjim at 11:00 A.M. (5 hours late from scheduled 7.00 A.M. arrival). A big thank to Sowmya who already booked two A.C. Deluxe room in Dona Julia Resort. By noon we were in our resorts. A quick breakfast and a 1 hour nap and we were on our way to explore Goa.
Van From Panjim to Dona Julia: INR 250

Fort Agwada 1st day we decided to explore whole of north Goa. We booked a maruti van, and the guy (name Francis) promised us to show 2 forts and 4 beaches (all in north goa) by 8 o’ clock. We headed first to Fort Aguada. It was a typical Portuguese architecture surrounded by the indian ocean from 2 sides. Chilling heat and we were all dead within 15 minutes. We decided to leave that place and headed towards the beaches.

Beach Vagator was our destination next. An hour of craziness in water, some hundred shots and we were like done for the day. Francis showed us the famous Dil Chahta Hai place which was next to beach vagator, about 1 km uphill. I very much wanted to see the place, but two chicks with us were in no mood. A few glass of lime soda and we headed towards Beach Anjuna.

Romance at Beach Vagator ;)There wasn’t much of a difference between Beach Vagator and Beach Anjuna. There were very few people on both the beach, with hardly any foreigners. 🙁 We did a bit of beach shopping and a few shots (finally we were all wet).

Bagga beach brought in some energy into our body. Some (infact a lot) sexy chicks roaming around, loud music, water sports, beach side massage and everything you expect from a beach was there. We targeted water sports first and went for that scary and crazy scooter ride. That was the first time I tasted that salty sea water. (Wonder how those scooter guys operate the whole day in that water) We decided to return back next day and try out para sailing.

It was 6:30 and we had no energy to visit Beach Calingut. We all headed back into our resorts and decided to hit the swimming pool at the resort. However once we all lied on the bed, it hardly took us 10 min to fall asleep. Got up at 9 o clock. Plan was to visit one of the famous bars and disco thek.
Van Cost: INR 900 for North Goa

dsc00525Another sensible thing we did was we hired two honda activa. That really made the trip more enjoyable for next 2 days. We had two options to choose from Titto’s or Mambo’s. As per Francis both were excellent. However since there was a 500 per couple entry fees in Titto’s we decided to hit Mambo’s 😉 We were there by 9:45 with everyone watching the IPL match. After inquiry I found that the disco thek starts at 10:30 and the disc rolls till 4 o’clock in the morning. I was like “wow“, kuddos to Goa government and F#&% this Karnataka government. It was a DJ from London who was supposed to spin the wheel that night. Hip Hop and house (last in my list of preferred music genre’s) was the theme. We all were some 3 beer down and I was just about to experience the best night ever. This part of the trip is what made “Dirty Dancing” as the title of this blog post. 2 o’ clock and we just didn’t stopped. Pretty chicks, some cool DJing, Rope dancing, 4 more beers and what else can you ask for. First time on a disco thek with Sowmya and what a night it turned out to be. Finally we had some khaati rolls and off to our resort.

Day 2: Saturday, 2nd May 09

Romance at Beach Calingut ;)It’s never easy to wake me up early morning and that was what Sashi and Ashna realised the next day. We decided to leave early for Calingut Beach and till 10:30 I was like showing no signs of getting up. With a driving force to enjoy this trip to the fullest, I was finally up. Had a nice breakfast at Sagar Restaurant (200 mts from our resort) and we headed towards Beach Calingut. I was like “wow”. There was no difference between what we saw yesterday at Bagga Beach and today at Calingut Beach. After bitching for about 30 minutes in salty sea water we headed for the deadly para sailing. Unfortunately we missed to take snaps of this part of our adventurous trip. However it was an experience of a lifetime, with my body floating mid air. Ashna and Sashi went for another round of scooter trip, meanwhile me and Sowmya were doing a photo shoot 😀 We were back in our resort by 3 o’clock and with no delays we hit the swimming pool back there. Swimming pool, beer, shades, photo shoot and that all you can ask for. Had our lunch and then back for a 1 hour nap.

Headbanging at Titto'sIn the evening we had our dinner at Sher-e-Punjab, a so-so restaurant on Beach Calingut. We planned out to visit the famous saturday night market before hitting the disco thek again. However, unfortunately it has been shut down during the off season. Next we decided to hit the Mambo’s once again but since today it was a 500 buck per couple entry tonight, we decided to try out titto’s. “Mauja re Mauja” and you can imagine the atmosphere inside. It was some nice bollywood remix rolling on the disc. However in my opinion Mambo’s have an upper hand as compared to music and ambience at Titto’s. We were soon out of that place, roaming on the streets of Goa before we hit Beach Bagga at mid night.

Day 3: Sunday, 3rd May 09

Finally a dream run was coming to an end. We had train (gareeb rath) back to bangalore at 3 o’clock afternoon. Guitar and some cool doods around in the train made the journey back home even more memorable. (We sang some 30 songs that night in the train spanning from Maa – Dasvidaniya to Nagin the Lady Cobra)

For more pictures of this memorable trip: