phpchamps Posted May 24, 2010 Share Posted May 24, 2010 Hi All, I am facing the issue with curl. I fire the curl request on php 5.2 and if i put a invalid zip code curl sends me a blank response. However, problem is when i fire curl request on 5.1.6 version of php. I get the response as 1 (ONE). Code.. $curl_handler = curl_init(); $options = array( CURLOPT_URL => '********', // CURLOPT_RETURNTRANSFER => True, CURLOPT_FOLLOWLOCATION => True, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 30, ); curl_setopt_array($curl_handler, $options); $raw_response = curl_exec($curl_handler); echo $raw_response; $curl_info = curl_getinfo($curl_handler); curl_close($curl_handler); Anybody is having any idea??? Link to comment https://forums.phpfreaks.com/topic/202730-curl-help-needed-urgent/ Share on other sites More sharing options...
katierosy Posted May 25, 2010 Share Posted May 25, 2010 I have PHP 5.2 in local machine, it works fine. <?php $curl_handler = curl_init(); $options = array( CURLOPT_URL => 'http://google.com', // CURLOPT_RETURNTRANSFER => True, CURLOPT_FOLLOWLOCATION => True, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 30, ); curl_setopt_array($curl_handler, $options); $raw_response = curl_exec($curl_handler); echo $raw_response; $curl_info = curl_getinfo($curl_handler); curl_close($curl_handler); ?> Link to comment https://forums.phpfreaks.com/topic/202730-curl-help-needed-urgent/#findComment-1063059 Share on other sites More sharing options...
phpchamps Posted May 25, 2010 Author Share Posted May 25, 2010 yaa it does work perfectly fine with 5.2.. issue is with php 5.1.6 Link to comment https://forums.phpfreaks.com/topic/202730-curl-help-needed-urgent/#findComment-1063153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.