Set
CURLOPT_RETURNTRANSFER
option:// ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
Per the docs:
CURLOPT_RETURNTRANSFER
-TRUE
to return the transfer as a string of the return value ofcurl_exec()
instead of outputting it out directly.
0 Comments