When I use this code:
$ch = curl_init($url);
$statuses = curl_exec($ch);
curl_close($ch);
I am returned what I want, but if I just use that - $statuses is echoed out onto the page.
How can I stop this?
When I use this code:
$ch = curl_init($url);
$statuses = curl_exec($ch);
curl_close($ch);
I am returned what I want, but if I just use that - $statuses is echoed out onto the page.
How can I stop this?
In addition to the accepted answer, make sure you didn't set CURLOPT_VERBOSE to true, if you add this
curl_setopt($ch, CURLOPT_VERBOSE, true );
there will be output from cUrl, even with CURL_RETURNTRANSFER set to true