OSDN Git Service

0b9a962c644e35244c53873d919e60a4143d8707
[embrj/master.git] / ajax / apiQuota.php
1 <?php 
2         include ('../lib/twitese.php');
3         if(!isset($_SESSION)){
4                 session_start();
5         }
6         $t = getTwitter();
7         $limit = $t->ratelimit();
8         $reset = intval((format_time($limit->reset_time) - time())/60);
9         $remaining = $limit->remaining_hits < 0 ? 0 : $limit->remaining_hits;
10         $hourly = $limit->hourly_limit;
11         header('Content-Type: text/html');
12         echo "<li><span style=\"color: #2276BB\">API: $remaining/$hourly</span></li>
13         <li><span style=\"color: #2276BB\">Reset in $reset min(s)</span></li>";
14 ?>