Re: PHP / Curl API failures
try increasing your connecttimeout On Feb 3, 8:48 am, Cameron Kaiser wrote: > > On Sunday (1 Feb 2009) I embedded the following code in my website > > (with appropraite variables set correctly): > > [...] > > > Which worked fine up until Monday morning (02 Feb 2009, 10:00 GMT > > ish). It then failed for about 24 hours. I started debugging it last > > night and my PHP script was not getting any status code back on the > > curl_exe line. Today (3 Feb) at about 08:00 it started working again > > without me changing anything! > > > I post about 10 message an hour (no more!) so I shouldn't reach any > > limits I guess. Can anyone suggest what is going on here ? > > 1) Connectivity? > > 2) Consider > > curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); > > in your PHP code or adjusting your timeout. > > -- > personal:http://www.cameronkaiser.com/-- > Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com > -- BOND THEME NOW PLAYING: The James Bond Theme from "Dr. No" > -
Re: PHP / Curl API failures
> On Sunday (1 Feb 2009) I embedded the following code in my website > (with appropraite variables set correctly): [...] > Which worked fine up until Monday morning (02 Feb 2009, 10:00 GMT > ish). It then failed for about 24 hours. I started debugging it last > night and my PHP script was not getting any status code back on the > curl_exe line. Today (3 Feb) at about 08:00 it started working again > without me changing anything! > > I post about 10 message an hour (no more!) so I shouldn't reach any > limits I guess. Can anyone suggest what is going on here ? 1) Connectivity? 2) Consider curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); in your PHP code or adjusting your timeout. -- personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * ckai...@floodgap.com -- BOND THEME NOW PLAYING: The James Bond Theme from "Dr. No" -
PHP / Curl API failures
Hi, On Sunday (1 Feb 2009) I embedded the following code in my website (with appropraite variables set correctly): $url = 'http://twitter.com/statuses/ update.json'; $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, "$url"); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_VERBOSE, 1); curl_setopt($curl_handle, CURLOPT_POST, 1); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status= $message"); curl_setopt($curl_handle, CURLOPT_USERPWD, "$username: $password"); $buffer = curl_exec($curl_handle); curl_close($curl_handle); Which worked fine up until Monday morning (02 Feb 2009, 10:00 GMT ish). It then failed for about 24 hours. I started debugging it last night and my PHP script was not getting any status code back on the curl_exe line. Today (3 Feb) at about 08:00 it started working again without me changing anything! I post about 10 message an hour (no more!) so I shouldn't reach any limits I guess. Can anyone suggest what is going on here ? Thanks DoubleDutch