Run -> cmd.exe) 6. Type in php -f twitter.php and leave it running 7. ???? 8. PROFIT */ $accounts = array( // fill in usernames/passwords here as shown below array('username1', 'password1'), array('username2', 'password2'), array('username3', 'password3') ); // have fun // if you know what you're doing you can of course add more username/password combinations // then you can also decrease the timer value: $timer = 15; $useragent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)"; $hashtag = "#gorillapenis"; $topics = array( "hemmorhoids", "genital", "ebaums", "nigger", "aids", "cancer", "faggot", "n00b", "penis", "vagina", "asshole", "fuck", "heil", "gonorrhea", "fucking", "pedophile", "ebaumsworld", "koran", "retard", "merkel", "lulz", "nazi", "hitler", "jews", "negro", "pooper", "talmud", "bible", "fag", "allah", "scrotum" ); $tweetUrl = 'http://www.twitter.com/statuses/update.xml'; $searchUrl = 'http://search.twitter.com/search.json?q='; $cnt = 0; $ucnt = 0; $tweets = array(); random_tweets(); while(1) { $status = $hashtag . ' ' . $tweets[rand(0,count($tweets)-1)]; ; if (strlen($status) > 140) $status = substr($status,0,140); $status = urlencode(stripslashes(urldecode($status))); $username = $accounts[$ucnt][0]; $password = $accounts[$ucnt][1]; $ucnt++; if ($ucnt == count($accounts)) { $ucnt = 0; $tweets = array(); random_tweets(); } $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "$tweetUrl"); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, "status=$status"); curl_setopt($curl, CURLOPT_USERPWD, "$username:$password"); curl_setopt($curl, CURLOPT_USERAGENT, $useragent); $result = curl_exec($curl); $resultArray = curl_getinfo($curl); if ($resultArray['http_code'] == 200) { $cnt++; echo "Tweet posted from account $username. "; echo "Altogether, $cnt tweets posted.\n"; } else { echo "$result"; echo "Could not post tweet to Twitter right now. Try again later.\n"; } curl_close($curl); sleep($timer); } function random_tweets() { global $topics,$searchUrl,$tweets; $topic = urlencode($topics[rand(0,count($topics)-1)]); $content = file_get_contents("$searchUrl$topic"); $content = json_decode($content, true); foreach ($content["results"] as $a => $b) { $tweets[] = $b["text"]; } } ?>