How can I stop cURL from outputting the contents of the page it loads into the browser?
I currently use curl_multi_* to connect to a few sites. Its only sending a few $_GET
variables to start a script, but it outputs the html from the sites to the browser. I want to stop this. I already use a short timeout, but sometimes the scripts start fast, and I don't want to set the timeout an开发者_Python百科y lower, in case it causes it not to connect.
So how can I stop the output to the browser from cURL?
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true)
This will cause curl_exec
to return the content of the URL as a string. Not sure what the implication are when using curl_multi.
精彩评论