Get Klout Score - Reduced to 6 Lines Lines
<?php
$klout_api_key = "";
$klout_id = json_decode(file_get_contents("http://api.klout.com/v2/identity.json/twitter?screenName=".$argv[1]."&key=$klout_api_key"))->{'id'};
$score = json_decode(file_get_contents("http://api.klout.com/v2/user.json/$klout_id/score?key=$klout_api_key"))->{'score'};
echo "Klout score for ".$argv[1]." is $score!\n";
?>
Comments