cooldude832 Posted July 16, 2008 Share Posted July 16, 2008 I'm trying to run a cURL to retrieve the curl_getinfo array for database purposes and my problem is its displaying all the cURL output of the url how do I prevent this? <?php $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL,$_POST['url']); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6"); curl_setopt($ch,CURLOPT_VERBOSE,1); curl_exec($ch); #print_r(curl_getinfo($ch)); ?> Quote Link to comment https://forums.phpfreaks.com/topic/115091-solved-curl-supressing-output/ Share on other sites More sharing options...
cooldude832 Posted July 16, 2008 Author Share Posted July 16, 2008 i'm an idiot found it curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); Quote Link to comment https://forums.phpfreaks.com/topic/115091-solved-curl-supressing-output/#findComment-591855 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.