7

Mar

2008

Yahoo Online/Offline Status Indicator

I am trying to redesign my homepage at the moment and in the process applying my new found skills with PHP. :) One thing I put in on all the versions of my homepage is a online status indicator with Yahoo! so that people can contact me directly and have their bricks on my face. Usually I go with the normal script code Yahoo! with their default images for online and offline statuses. But this time, I wanted to display custom images for my online and offline status indicators.

A quick search led me to a where online status is checked using various links from yahoo themselves. It was a good source of inspiration. I used this piece of code:

http://mail.opi.yahoo.com/online?u=[username]&m=a&t=1

Which showed a 00 for offline and 01 for online. After a million errors, my newbie skills finally graduated and I created this script which checks for online and offline status of a username and displays custom images depicting the same.

<?
//Insert yahoo messenger status
$check_it = “http://mail.opi.yahoo.com/online?u=getanand321&m=a&t=1″;
$id =”getanand321″;
$online=”<a href=’ymsgr:sendIM?getanand321′><img src=’http://www.theanand.com/images/online-smile.png’ border=’0′></a><br>”;
$offline=”<img src=’http://www.theanand.com/images/offline-smile.png’><br>”;
$file = fopen(”$check_it”.”$id”, “r”);$read = fread($file, 200);
$read = ereg_replace($id, “”, $read);
if ($y = strstr ($read, “00″)) {
$x = “$offline”;
}elseif ($y = strstr ($read, “01″)) {
$x = “$online”;
}
echo (”$x”);
fclose($file);
?>

Put this into a html page and save it as a .php file and upload. Done! I was surprised that I could do this in just 10-15 lines of code than be using any third party script! Hope this helps those who are looking for a solution to display their yahoo messenger status on their websites and homepages. I will soon share a script where you can display your blogs latest posts on a static homepage, in this case, my homepage which is in html at the moment.

Update: I just noted that this same procedure can be used to find if an user is invisible in yahoo or not! This is another accidental yahoo messenger invisible hack!!!


For updates on Yahoo Online/Offline Status Indicator, Enter your email here:


Comments to this post

5
  • shobankr says:
    MyAvatars 0.2

    Add a Google talkback gadget buddy!!! :)

  • Anand says:
    MyAvatars 0.2

    ah, I started using gtalk only recently, that too for the mobme guys :lol: I love Yahoo! they rock . . .

  • LOxEN says:
    MyAvatars 0.2

    I’m pretty sure I visited this topic not long time ago and there were more comments, and in one of the comment a guy posted a link to a page where you could see if a yahoo user is offline or invisible…it was a vietnam site, were the comments deleted ?

  • mobo says:
    MyAvatars 0.2

    thanks ^.^

  • Charis says:
    MyAvatars 0.2

    Hi there I am trying to find some help about using the yahoo online status indicator

    I can insert the yahoo smily online face and get it to work ok

    First I have a chat site that alows users to check out other profiles and chat to them

    I have a list off all the members to my site and they all have yahoo smiley faces so I can see who is online on yahoo I want to be able to search my site to filter the members to only display those members that are signed in to yahoo messenger not to show the members of my site that are logged in to my site

    SO that on my on my search page I can have i am a _____ looking for a _________ and also have a field for show only people who are online yahoo

    Does anyone know how I could get this to work?

    Any help would be great


Leave a Reply

Get Chitika eMiniMalls Get 250 Free Business Cards At VistaPrint.com!
affiliate_link TheUniversityKid

TheAnand's Best Posts

Recent comments

Recent Posts

Categories