Monday 4 April 2016

Curl automatically display the result? / Without print, response is displayed me in CURL php

By default, the curl extension prints out the result.
You need to enable the CURLOPT_RETURNTRANSFER option, like so:

curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

After that option is enabled, curl_exec will return the result, instead.

No comments:

Post a Comment