Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /********************************************************************************
- * Auto Tweet
- * Simplified Modified By Josetstwn99 & ./Wiceng404
- * Aku Ini Ganteng Loh, Tapi Aku Jones :(* Jangan Pernah Mengubah Tulisan Ini! Hargai Pembuatnya #SekAsek >_<
- *********************************************************************************/
- if(!empty($_GET['x'])){
- $status = $_GET['x'];
- } else {
- $quote = file("status.txt");
- $isine = $kata[array_rand($quote)];
- $statuse= $isine;
- }
- $f = fopen('count.txt', 'r'); //pada start awal, isi count dg angka 1
- $i = fscanf($f, '%d');
- $b = $i[0];
- require 'tmhOAuth.php';
- require 'tmhUtilities.php';
- $tmhOAuth = new tmhOAuth(array(
- 'consumer_key' => 'xxxxxx', // isi dengan consumer key
- 'consumer_secret' => 'xxxxxx', // isi dengan consumer secret
- 'user_token' => 'xxxxxx', // isi dengan user token
- 'user_secret' => 'xxxxxx', // isi dengan user secret
- ));
- $code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/statuses/update'), array(
- 'status' => "$quote[$b]"
- ));
- if ($code == 200) {
- tmhUtilities::pr(json_decode($tmhOAuth->response['response']));
- } else {
- tmhUtilities::pr($tmhOAuth->response['response']);
- }
- $f = fopen('count.txt', 'r+' );
- $count = fread($f, filesize('count.txt'));
- rewind($f);
- $count++;
- fwrite($f, $count);
- ftruncate($f, ftell($f));
- fclose( $f );
Advertisement
Add Comment
Please, Sign In to add comment