I'm trying to retweet with the twitter api: http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-retweet But I want to do the following command line as curl in php: curl -u user:password -X POST http://api.twitter.com/1/statuses/retweet/12345.xml Code (markup): At the moment I have the following which isn't working? $curl = curl_init("http://api.twitter.com/1/statuses/retweet/12345.xml"); curl_setopt($curl, CURLOPT_USERPWD, "username:password"); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_TIMEOUT, 10); $xml = curl_exec($curl); curl_close($curl); echo $xml; PHP: What am I doing wrong?