[http_code] => 0

22 views
Skip to first unread message

vks

unread,
Oct 29, 2008, 5:49:15 AM10/29/08
to Twitter Development Talk
Hi,
I got a twitter http_code is zero while submitting my message through
twitter API(using curl).What is the meaning of this [http_code] =>
0]?. The same response [http_code] => 0] is return in case of success/
error posting.But it is correctly working our development server.The
problem is on our live server.

Is this issue related to the version of curl.

here is my response

Array ( [url] => http://twitter.com/statuses/update.xml?status=Message
[http_code] => 0 [header_size] => 0 [request_size] => 204 [filetime]
=> -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] =>
0.032531 [namelookup_time] => 0.0105 [connect_time] => 0.032127
[pretransfer_time] => 0.032194 [size_upload] => 0 [size_download] => 0
[speed_download] => 0 [speed_upload] => 0 [download_content_length] =>
0 [upload_content_length] => -1 [starttransfer_time] => 0.032493
[redirect_time] => 0 )
CURL PATH: curl: /usr/bin/curl /usr/bin/curl.old /usr/include/curl /
opt/curlssl/bin/curl /usr/share/man/man1/curl.1.gz

A reply is highly appreciated.

Thanks,
VKS.

Alex Payne

unread,
Oct 29, 2008, 3:37:30 PM10/29/08
to twitter-deve...@googlegroups.com
Any chance you can provide raw request/response output, not output
from I'm guessing is the PHP curl library?

--
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x

fastest963

unread,
Nov 6, 2008, 10:52:58 PM11/6/08
to Twitter Development Talk
hey alex! The problem is that he happened to have post enabled.
@vks
comment out curl_setopt($ch, CURLOPT_POST, 1);
or change it to curl_setopt($ch, CURLOPT_POST, 0);

that will fix your error :)

Alex Payne

unread,
Nov 7, 2008, 2:49:41 AM11/7/08
to twitter-deve...@googlegroups.com
Thanks for helping out!

--

vks

unread,
Nov 7, 2008, 4:44:02 AM11/7/08
to Twitter Development Talk
Thanks fastest963, your are correct it was the issue, i already fix
it.

Thanks,
VKS.
Reply all
Reply to author
Forward
0 new messages