Advertisement
Guest User

Zerxer

a guest
Nov 2nd, 2009
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.24 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. if(empty($_SESSION['token'])) {
  5.     $token = $_GET['token_a'];
  6.     if(empty($token)) {
  7.         ?>This page will tell you how many AIM buddy lists your screenname is added to. <a href="https://api.screenname.aol.com/auth/login?devId=ze1qK3Y3NTg_qyuI&f=qs&succUrl=http://www.sitexero.net/aim/">Click here to log in <b>securely</b> first</a><?
  8.         die();
  9.     }
  10.     $_SESSION['token'] = $token;
  11.     header("Location: http://www.sitexero.net/aim/");
  12.     die();
  13. }
  14. $ch = curl_init();
  15. curl_setopt($ch, CURLOPT_REFERER, "http://www.sitexero.net/aim/");
  16. curl_setopt($ch, CURLOPT_URL, "http://api.oscar.aol.com/aim/startSession?f=json&invisible=true&succUrl=http://www.sitexero.net/aim/&k=ze1qK3Y3NTg_qyuI&a=" . urlencode($_SESSION['token']) . "&events=myInfo");
  17. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  18. $tmp = @json_decode(curl_exec($ch), true);
  19. switch($tmp['response']['statusCode']) {
  20.     case 450:
  21.         ?><script type="text/javascript">
  22.             setInterval(function(){
  23.                 if(location.hash == '#CONSENTDONE'){
  24.                     location.hash = '';
  25.                     location = 'http://www.sitexero.net/aim/';
  26.                 }
  27.             }, 1000);
  28.         </script>
  29.        
  30.         <iframe src="<?=$tmp['response']['data']['redirectURL']?>&devId=ze1qK3Y3NTg_qyuI&f=qs" width="600" height="400" frameborder="0"></iframe><br><br>
  31.         <b>Did you already accept and nothing happened? <a href="http://www.sitexero.net/aim/">Click here to reload the page then</a></b><?
  32.         die();
  33.         break;
  34.        
  35.     case 200:
  36.         $sn = $tmp['response']['data']['myInfo']['aimId'];
  37.         $aimsid = $tmp['response']['data']['aimsid'];
  38.         $tmp = @json_decode(file_get_contents("http://api.lifestream.aol.com/lifestream/getMyInfo?aimsid=" . $aimsid . "&f=json&k=ze1qK3Y3NTg_qyuI"), true);
  39.         if(empty($tmp))
  40.             bye(0);
  41.         switch($tmp['response']['statusCode']) {
  42.             case 200:
  43.                 ?><?=$sn?> is added on <b><?=number_format($tmp['response']['data']['watcherCount'])?></b> buddy lists and has <b><?=number_format($tmp['response']['data']['buddyCount'])?></b> buddies added.<?
  44.                 break;
  45.             case 607:
  46.                 ?>Screen name is rate limited from retrieving this information. Try again later.<?
  47.                 break;
  48.             default:
  49.                 ?>Unknown response code. Try again later.<?
  50.                 break;
  51.         }
  52.         break;
  53.        
  54.     case 607:
  55.         ?>Screen name is rate limited from retrieving this information. Try again later.<?
  56.         break;
  57.        
  58.     default:
  59.         bye($tmp['response']['statusCode']);
  60. }
  61. fin();
  62.  
  63. function bye($i) {
  64.     print "Oops, something unexpected happened. Oh well, better luck next time!<!--{$i}-->";
  65.     fin();
  66.     die();
  67. }
  68.  
  69. function fin() {
  70.     ?><br><br><br>You've been logged out now. <a href="https://api.screenname.aol.com/auth/login?devId=ze1qK3Y3NTg_qyuI&f=qs&succUrl=http://www.sitexero.net/aim/">Click here to start again</a><iframe src="http://api.screenname.aol.com/auth/logout?devId=ze1qK3Y3NTg_qyuI&a=<?=urlencode($_SESSION['token'])?>" frameborder="0" width="1" height="1"></iframe><?
  71.     $_SESSION['token'] = null;
  72.     unset($_SESSION['token']);
  73. }
  74. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement