Advertisement
tobitaz

removerv3.php

Oct 8th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1.   <?php
  2. //ubah nama file yg ko nak untuk simpan token
  3. $tokenko = "tk.txt";
  4.  
  5.  
  6. $f = file_get_contents($tokenko);
  7.  
  8. $geto = preg_split('/(\r?\n)+/', $f);
  9.       foreach($geto as $phc)
  10. {
  11.        //cek token invalid
  12.        $c = curl_init("https://graph.facebook.com/100002228225187_514893268594943/likes?method=post&access_token=".$phc);
  13.                curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  14.        $k = curl_exec($c);
  15.                curl_close($c);
  16.  
  17.        $check = strripos($k, "OAuthException");
  18.  
  19.       if($check === false)
  20.        {
  21. $hidup.= $phc."\n";
  22.        }
  23.        else
  24.        {
  25.        
  26.        
  27.        }
  28. }
  29.  
  30.  
  31.        $fop = fopen($tokenko, "w+");
  32.                   fwrite($fop, $hidup);
  33.                   fclose($fop);
  34.  
  35. echo "token has been refrashed";
  36.  
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement