momodrock

tweet.php

Oct 31st, 2013
8,137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. <?php
  2. /********************************************************************************
  3. * Auto Tweet
  4. * Simplified Modified By Josetstwn99 & ./Wiceng404
  5. * Aku Ini Ganteng Loh, Tapi Aku Jones :(* Jangan Pernah Mengubah Tulisan Ini! Hargai Pembuatnya #SekAsek >_<
  6. *********************************************************************************/
  7. if(!empty($_GET['x'])){
  8. $status = $_GET['x'];
  9. } else {
  10.  
  11. $quote = file("status.txt");
  12. $isine = $kata[array_rand($quote)];
  13. $statuse= $isine;
  14.  
  15. }
  16.  
  17. $f = fopen('count.txt', 'r'); //pada start awal, isi count dg angka 1
  18. $i = fscanf($f, '%d');
  19. $b = $i[0];
  20.  
  21. require 'tmhOAuth.php';
  22. require 'tmhUtilities.php';
  23. $tmhOAuth = new tmhOAuth(array(
  24. 'consumer_key' => 'xxxxxx', // isi dengan consumer key
  25. 'consumer_secret' => 'xxxxxx', // isi dengan consumer secret
  26. 'user_token' => 'xxxxxx', // isi dengan user token
  27. 'user_secret' => 'xxxxxx', // isi dengan user secret
  28. ));
  29.  
  30. $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array(
  31. 'status' => "$quote[$b]"
  32. ));
  33.  
  34. if ($code == 200) {
  35. tmhUtilities::pr(json_decode($tmhOAuth->response['response']));
  36. } else {
  37. tmhUtilities::pr($tmhOAuth->response['response']);
  38. }
  39.  
  40. $f = fopen('count.txt', 'r+' );
  41. $count = fread($f, filesize('count.txt'));
  42. rewind($f);
  43. $count++;
  44. fwrite($f, $count);
  45. ftruncate($f, ftell($f));
  46. fclose( $f );
Advertisement
Add Comment
Please, Sign In to add comment