Advertisement
janter13

Deletin humu

Sep 1st, 2014
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. require_once('twitteroauth/twitteroauth.php');
  3. require_once('start.php');
  4.  
  5. $open=opendir($tem);
  6. while($file=readdir($open)){
  7. if($file != '.' && $file != '..'){
  8. $con[]=explode('_',$file);
  9. }
  10.  
  11. for($i=0;$i<count($con);$i++){
  12. $nusbol = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $con[$i][1], $con[$i][2]);
  13. $tusbol = $nusbol->get('account/verify_credentials');
  14.  
  15. if(!$tusbol->name){
  16. $ho[]=1;
  17. unlink($tem.'/'.$file);
  18. }else{
  19. $mo[]=1;
  20. }
  21. }
  22. }
  23. echo '<title> Refresh Humu </title>';
  24. echo 'Token Modar = '.count($ho).'<hr>
  25. Token Idup = '.count($mo).'<hr>
  26. Jumlah Humu = '.jumlahhumu($tem);
  27.  
  28. function jumlahhumu($dir){
  29. $x=opendir($dir);
  30. while($y=readdir($x)){
  31. if($y != '.' && $y != '..'){ $n[]=$y;}
  32. }
  33. closedir($x);
  34. return count($n);
  35. }
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement