<?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?
<?php google. com'; yourserver/ api/statuses/ update. xml'; $curl_handle, CURLOPT_URL, "$url"); $curl_handle, CURLOPT_ CONNECTTIMEOUT, 2); $curl_handle, CURLOPT_ RETURNTRANSFER, 1); $curl_handle, CURLOPT_POST, 1); $curl_handle, CURLOPT_POSTFIELDS, "status=$message"); $curl_handle, CURLOPT_USERPWD, "$username: $userapi" ); $curl_handle) ; $curl_handle) ;
$username = 'jiskousername';
$userapi = 'jiskouserapi';
$message = 'http://
$url = 'http://
$curl_handle = curl_init();
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
$buffer = curl_exec(
curl_close(
//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?