michaellunsford Posted February 29, 2008 Share Posted February 29, 2008 If I run the following code from the commandl line on the server, I get results. If I run it from a browser, I get a long delay and eventually a blank document -- no errors. Any idea what this could be? Link to comment https://forums.phpfreaks.com/topic/93737-curl-works-from-command-line-but-not-browser/ Share on other sites More sharing options...
deansatch Posted February 29, 2008 Share Posted February 29, 2008 Where is the "following code"? Link to comment https://forums.phpfreaks.com/topic/93737-curl-works-from-command-line-but-not-browser/#findComment-480312 Share on other sites More sharing options...
michaellunsford Posted February 29, 2008 Author Share Posted February 29, 2008 <?php $myvar="http://www.example.com?somegetvar=someval&anothergetvar=someval" $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $myvar); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch) ; curl_close($ch); ?> Link to comment https://forums.phpfreaks.com/topic/93737-curl-works-from-command-line-but-not-browser/#findComment-480370 Share on other sites More sharing options...
michaellunsford Posted March 1, 2008 Author Share Posted March 1, 2008 bump Link to comment https://forums.phpfreaks.com/topic/93737-curl-works-from-command-line-but-not-browser/#findComment-480867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.