Ad Code

Curl_exec printing results when I don't want to

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 of curl_exec() instead of outputting it out directly.

Post a Comment

0 Comments