Ehsanul Haque

Welcome to my personal site & blog

26 May
0Comments

Voice Support with Yahoo! Messenger for Mac

After I bought my Mac Book Pro in March, one of the software I installed instantly was Yahoo! Messenger. I use it to talk to my parents everyday, who are in Bangladesh at the moment. Besides that fact, most of my open source community friends are on Yahoo! Messenger, not to mention few of my friends also.

When I installed YIM, it was kind of disappointing. It didn’t have the voice support and, therefore, I had carry my office laptop everyday with me. As Tithi uses her laptop to work on her course works, I needed to bring in office laptop so that I could talk to my parents back home. I used to constantly check Yahoo! Messenger’s blog and kept my eyes open. Finally about couple of weeks ago I found out that they have released a new build for Yahoo! Messenger for Mac 3.0 (BETA). I (literally) started jumping in joy and finally when I talked to my parents later that night, I was really happy. Hope YIM will port all the other fancy features available on Windows version, but I guess I can live with the features offered on the current version. Thank you guys (YIM Team) for making it happen. Keep up the good work.

25 May
4Comments

Grab Yahoo Class on phpclasses.org

Today my class titled Grab Yahoo has been published on www.phpclasses.org.

This class is a collation of my previous two scripts in PHP to grab Yahoo address book and messenger list. You will have to provide your
Yahoo account username and password to it which will return an array of the list of your choosen service (Address Book or Messenger List).

This will be useful in a way that anyone willing to provide the service like upon user registration to the site, you ask the person to invite people on their Yahoo address book etc. Similar to what Hi5, Name Database etc does.

Please visit the download page here to download the class pack.

Visit the discussion board to post any suggestion, comment or bug to report.

Please don’t forget to rate my script.

Visit this page to see the demo.
~~Thanks to all and God Bless!!~~

18 May
17Comments

Yahoo! Services with PHP cURL

Using cURL in PHP is not that tough after all. Just the other day I came up with a script that grabs the Yahoo! Address Book. Today I have modified the same script to grab Yahoo! Messenger friend list.

Check out grabbers here.

One must know the URLs that Yahoo! goes through and data that it passes for authentication. After cURL helps you to authenticate on Yahoo, you simply write a Cookie file to contain the session information. This file is used later part of the script where cURL helps you to grab the address book or messenger list.

You will need to trick Yahoo by sending header information like HTTP Referrer. Address book is grabbed in CSV format, which needs to be parsed to show your desired information. There are 82 columns that address book sends you!! For messenger it is just cleaning up a HTML file generated by cURL. You instruct cURL not to give any output of the generated result, then save it on a temporary file, clean up unnecessary information, reformat the remaining information and print it on the screen. At the end you MUST use unlink() to delete all the files that were generated during the process. Cookie file, messenger list file etc. I have deleted them, being a good boy!!

Here is the partial sample code.

https://login.yahoo.com/config/login?”;
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 22);
curl_setopt($ch, CURLOPT_POSTFIELDS, …..!!! STOP HERE

The script for grabbing Yahoo messenger list has been published on weberdev.com. Please click “Yahoo! Messenger Friend List” to see my code on weberdev.com and download the ZIP attached to the example.

~~EnJoY~~