Comment 2 for bug 581457

Revision history for this message
michaelmorriss (mrxqware) wrote :

<?php
$username = 'jiskousername';
$userapi = 'jiskouserapi';
$message = 'http://google.com';
$url = 'http://yourserver/api/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=$message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$userapi");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
//curl_close($tw);
?>

Sorry I've copied the wrong code (i had the good one; otherwise it should gave me an authorisation error).
 But it still doesn't work.
Could you test it?