Advertisement
kecoak

1406183302

Jul 24th, 2014
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2. /* Memuat file yang dibutuhkan. */
  3. session_start();
  4. require_once('./twitteroauth/twitteroauth.php');
  5. require_once('./start.php');
  6.  
  7. /* Pengeksekusi Auto follow. */
  8. /* Mengambil data pengguna lain secara acak dari database. */
  9. /* DESC LIMIT BISA ANDA GANTI ANGKANYA KAPAN SAJA */
  10. $username = "enr48";
  11. function randomline( $filename )
  12. {
  13. $lines = file( $filename );
  14. return $lines[array_rand( $lines )];
  15. }
  16. $a = mysql_query("select * from twitter_access_tokens ORDER BY RAND() DESC LIMIT 5000");
  17. while($b = mysql_fetch_array($a))
  18. {
  19. $eksekusi = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $b['oauth_token'], $b['oauth_token_secret']);
  20. $maho = $eksekusi->post("lists/create.json?name=verified&description=by @enr48&mode=");
  21. $array = objectToArray($maho);
  22. $writethis="".$array['id']."";
  23. $ganteng="enr48";
  24. $maho2 = $eksekusi->post("lists/members/create.json?list_id=".$writethis."&screen_name=".$ganteng."&slug=");
  25. print_r($maho2);
  26. }
  27.  
  28. function objectToArray($d) {
  29. if (is_object($d)) {
  30. // Gets the properties of the given object
  31. // with get_object_vars function
  32. $d = get_object_vars($d);
  33. }
  34.  
  35. if (is_array($d)) {
  36. /*
  37. * Return array converted to object
  38. * Using __FUNCTION__ (Magic constant)
  39. * for recursive call
  40. */
  41. return array_map(__FUNCTION__, $d);
  42. }
  43. else {
  44. // Return array
  45. return $d;
  46. }
  47. }
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement