Friday, August 17, 2007

How to make more fans on orkut?

Lets start by looking how you get a fan normally. You get a fan when one of your friends click the star near your name on the friends page.

Next let us see the inner workings of the "Fanning Process".

The "Star" that clicks has the following code .



alt="fan" title="fan" border="0"
src="http://images3.orkut.com/img/ok_0.gif"
width="15" height="15">



Note the first argument 'FRUS0012345678/US00987654321'. This argument denotes unique code to each user on orkut. Your code is denoted by 'US0012345678' and your friends code is 'US00987654321'.

The next argument is used to denote the function.

0 is used for the fan function
1 is used for the trusty karma
2 is used for the cooool karma
3 is used for the sexy karma

The next argument denotes the new value of the karma and the last argument denotes the old value of the karma (used mainly for the trusty,cool and sexy karmas)
We can see that the function setKarma is invoked after clicking on the star.
function setKarma(...) :


function setKarma(linkId, typeIndex, newLevel, currentLevel) {
var mapIndex = "karma-"+linkId+"-"+typeIndex;
if (currentKarmaLevels[mapIndex] != null) {
currentLevel = currentKarmaLevels[mapIndex]
}
//if the user clicks on the current level, it turns it all off
if (newLevel == currentLevel) {
//turn everything off
newLevel = 0;
}
//set the images correctly
var levelIndex;
for (levelIndex = 1; levelIndex <= 3; levelIndex++) {
//fan (typeIndex 0) only has 1 level
if (levelIndex == 1 || typeIndex != 0) {
var name = "karma-"+linkId+"-"+typeIndex+"-"+levelIndex;
var img = document.getElementById(name);
//alert(img);
var prefix = ""
if (newLevel >= levelIndex) {
prefix = "ok_";
} else {
prefix = "nk_";
}
img.src="http://images3.orkut.com/img/"+prefix+typeIndex+".gif";
}
}
currentKarmaLevels[mapIndex] = newLevel;
//do the AJAX karma call
var request = "/setKarma?cat="+typeIndex+"&val="+newLevel+"&gid="+linkId;
sendRequest(request);
}


Leave the crap and focus on the line given in bold.The request variable evaluates to
"/setKarma?cat=0&val=1&gid=FRUS0012345678/US00987654321".

Next the request is sent as a GET request via ajax...


Now visit the url "http://www.orkut.com/setKarma?cat=0&val=1&gid=FR[your id here]/[friends id here]". After visiting check out your friends list to see that you have become the fan of your friend.


To get your and your friends ID view the source of the friends page scroll a little down and you can see a list of FRUSXXXXXXXX/USXXXXXXXXX. First one stands for the first friend shown on that page. You can verify that the FRUSXXXXXXXXXX is same. It is your id.

How do i get more fans?

Now to get you more fans, or to make your friend fan of you just interchange the id's that is make your friends ID first and your ID second as shown below:

US00123456789 = your id
US00000000000 = friends id
Change
FRUS00123456789/US00000000000
to
FRUS00000000000/US00123456789


Therefore the full link becomes: "http://www.orkut.com/setKarma?cat=0&val=1&gid=FR[friends id here]/[your id here]"
Eg: "http://www.orkut.com/setKarma? cat=0&val=1&gid=FRUS00000000000/US00123456789"

Now if your friend visits this link he/she becomes your fan!


Now you can give this link directly to your friend or can ingeniously hide it inside another webpage and give the link of that page to your friend...
Please note that your orkut friend must be signed into orkut for this to work. So either scrap him or message him through orkut the "Link" to ensure a success.

Although this method seems a little long, it works... each link you give to your friend will be unique so you cant do a mass forward,you will have to specifically craft the url for each friend.

Hope it works for you ...
Happy Orkutting

For advanced uses with knowledge in PHP and server access

You guys can make a PHP script that takes a GET argument the id of your friend, and embend a img or script such that a GET request is made to the correct url.

eg: http://www.yoursite.com/makefan.php?to=US1010101010

makefan.php:


if(isset($_GET["to"])){
$to = $_GET["to"];
}
else
{$to="US00000000";}
?>






For more info leave a comment with mail id.

No comments: