Spiga

New project Launch – YM Archive

August 02, 08 by Gabi Solomon

I have been writing a small website in the small free time i have had for the past 2 months, and testing it to see how it will perform if many users will start to use it and now i believe i can make it public, at least as pre-alpha state :D .

The website is called YM Archive and the ideea is of an archive that will keep a track of a users activity on Yahoo messenger ( online times and avatars ). It only records the online time, not the invisible time as i value the users privacy … if he wants to be invisible he must have a reason to do it.

The website was originaly build for me, since many times i wanted to know if a person has been online today and i have missed him, but i figured maybe others will want the same information … so make it a public service.

As a pointer, the website only tracks a limited amount of users, the ones that it has in its database. To add a new user in the database you need to do a search for it and it will add it automatically, and from that point it will track its status, so next time you look the same ID up it should have some history for you ( if the user has been online since add ).

In time the website will integrate other IM services, and maybe include an user account where you will have some stats printed out for you and your friends.

Hope you enjoy it.
Cheers

PS: I am curious to see when will my hosting close my account for to many curl connections :) )

How to check if a yahoo user exits using php

June 22, 08 by Gabi Solomon

On a recent project i had to find a way to test if a yahoo user account entered by the user is real or not. The purpose of this was to not create unnecessary load on the server for an id that wasn't real. So i went to the yahoo registration form and looked on how do they check it.

In that form the access this address if i test my id :

https://edit.yahoo.com/reg_json?PartnerName=yahoo_default&AccountID=solomongaby@yahoo.com&ApiName=ValidateFields

There were a few other get parameters but i strip them out, since they didnt seem to add any more value, and the result was the same. If the account you entered ( solomongaby@yahoo.com in this case ) is a valid one the result will be :

HTML:
  1. {
  2.   "ResultCode":"PERMANENT_FAILURE",
  3.   "SuggestedIDList": ["infostud_ro79@yahoo.com",  "infostud_ro12@yahoo.com",  "infostud_ro89@yahoo.com"], 
  4.    "SuggestedDBIDList":["infostud_ro33@rocketmail.com","infostud_ro38@ymail.com"],
  5.    "ErrorList":[{"ErrorCode":"100000","ErrorField":"AccountID"}]
  6. }

As you see the result already has the recomandation into it. If you try to run the same request for an id that doenst exist like solomongaby12382109 you would get this result:

HTML:
  1. {"ResultCode":"SUCCESS"}

Based on this i wrote a small php function :

PHP:
  1. $check = file_get_contents('https://edit.yahoo.com/reg_json?PartnerName=yahoo_default&AccountID='.$this->id_name.'@yahoo.com&ApiName=ValidateFields');
  2.         if ( strpos($check,'SUCCESS')===false ) return true;
  3.         else return false;

Hope this has helped you.
Cheers