Ejemplo n.º 1
0
  * var_export($kloutid);
  * print "\n"; 
  */
 $http_code = $klout->info['http_code'];
 print strftime("%Y-%m-%d %H:%M:%S", date('U')) . " - " . $from_user_name . " - " . var_export($kloutid, 1) . " - " . $http_code . "\n";
 if ($http_code != 200) {
     if ($http_code == 403 || $http_code == 503 || $http_code == 504) {
         $errors++;
     }
     if ($errors > 2) {
         die("died because of " . $http_code . "\n");
     }
 }
 if (!empty($kloutid)) {
     // @todo this assumes that on line 60 of KloutAPIv2-PHP/KloutAPIv2.class.php the following is added: if($ResultString === NULL) return $ResultString;
     $userScore = json_decode($klout->KloutUserScore($kloutid));
     $kloutScore = ceil($userScore->score);
     $kloutDayChanges = $userScore->scoreDelta->dayChange;
     $kloutWeekChanges = $userScore->scoreDelta->weekChange;
     $kloutMonthChanges = $userScore->scoreDelta->monthChange;
     /*
      // topics
      $result = $klout->KloutUserTopics($kloutid);
      $topics = json_decode($result);
     
      foreach ($topics as $topic) {
      //$slug = $topic->slug;
      //$imageUrl = $topic->imageUrl;
      //$dislayName = $topic->displayName;
      $kloutTopics[] = $topic->displayName;
      }