Since december 3rd a working php-script (it runs almost a year for
now)
stopped communicating with the twitter-api. Now, I receive allways the
non-existing http_code "0".

It's wired: If I run the script on a different server - it still works
fine.

Here is the code:

$url = 'http://twitter.com/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_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl_handle, CURLOPT_VERBOSE, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=Just another
message");
curl_setopt($curl_handle, CURLOPT_USERPWD, "username:password");

$buffer = curl_exec($curl_handle);

$twitter_status = curl_getinfo($curl_handle);
$twitter_s_h_c = $twitter_status["http_code"];

curl_close($curl_handle);

This is the result of the main server (where it stopped working - but
I can
use curl to catch other services than twitter (!)):

Status: url - http://twitter.com/statuses/update.xml: http_code - 0:
header_size - 0: request_size - 0: filetime - -1: ssl_verify_result -
0:
redirect_count - 0: total_time - 0: namelookup_time - 0.021014:
connect_time - 0: pretransfer_time - 0: size_upload - 0: size_download
- 0:
speed_download - 0: speed_upload - 0: download_content_length - 0:
upload_content_length - 0: starttransfer_time - 0: redirect_time - 0


This is the result of the test server:

Status: url - http://twitter.com/statuses/update.xml: content_type -
application/xml; charset=utf-8: http_code - 200: header_size - 829:
request_size - 289: filetime - -1: ssl_verify_result - 0:
redirect_count -
0: total_time - 0.722216: namelookup_time - 0.002029: connect_time -
0.171671: pretransfer_time - 0.171746: size_upload - 0: size_download
-
1925: speed_download - 2665: speed_upload - 0: download_content_length
-
1925: upload_content_length - 0: starttransfer_time - 0.722104:
redirect_time - 0

I checked out older messages around here and at the google results and
I
found just three hints, that don't apply to this case. I hope anyone
can
give me a hint to solve this issue.

Greetings, Daniel

Reply via email to