Nuv Posted June 15, 2011 Share Posted June 15, 2011 I am using this basic code to capture the data using Curl. However the $result won't echo any of the images. How can i capture images too ? <?php $url = "http://www.hot.com/xxx.php"; $variables = "post=fields"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, 1 ); curl_setopt($ch, CURLOPT_POSTFIELDS, $variables); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); $result = curl_exec ($ch); curl_close ($ch); echo $result; ?> Quote Link to comment https://forums.phpfreaks.com/topic/239474-curl-wont-display-image/ Share on other sites More sharing options...
trq Posted June 16, 2011 Share Posted June 16, 2011 You would to download them separately. Quote Link to comment https://forums.phpfreaks.com/topic/239474-curl-wont-display-image/#findComment-1230387 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.