@kofai asked me to share my Fanfou to Twitter sync script. It’s not art, but it works, so here goes: <?php define(STATUS_PATH, ‘/home/www/twitbridg/status/’); include_once(‘password.php’); $since_id = file_get_contents(STATUS_PATH.$twitter_username.’.last’) OR $since_id = ‘1’; // The twitter API address $url = ‘https://twitter.com/statuses/user_timeline/’.$twitter_username.’.xml?since_id=’.$since_id; $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_GET, 1); $buffer […]
Read more..