<?php
$tuser_arr = array("twitteruser1", "twitteruser2", "twitteruser3", "twitteruser4", "twitteruser5", "twitteruser6", "twitteruser7", "twitteruser8", "twitteruser9", "twitteruser10");
$password = 'twitter_passwd'; //all 10 accs use same passwd
function RandomLines($filename){
$lines = file($filename);
return $lines[array_rand($lines)];
}
foreach ($tuser_arr as $username) {
$r_line = RandomLines('tweets.txt'); //file with list of tweets
$url = 'http://twitter.com/statuses/update.xml';
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$r_line");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
}
?>