hi i was wondering if anyone is able to create a script or a cron job to post automatic tweets for me liike every 30 minutes or 45 minutes about 20-40 different default tweets so that it can repeat 24-7... and also i want a cron job or script to go to a website and enter name and password to add followers if you are able to do please pm me
Here is the function to post tweets to twitter: <?php function tweet($message, $username, $password) { $context = stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => sprintf("Authorization: Basic %s\r\n", base64_encode($username.':'.$password)). "Content-type: application/x-www-form-urlencoded\r\n", 'content' => http_build_query(array('status' => $message)), 'timeout' => 5, ), )); $ret = file_get_contents('http://twitter.com/statuses/update.xml', false, $context); return false !== $ret; } ?> PHP: If say your script file is tweet.php and you need to run it by cron with given time interval, you can add new task to cron scheduler, to call this script. For example, using lynx browser: lynx -dump http://mysite.com/mydir/tweet.php > /dev/null Code (markup):