Create a gist now

Instantly share code, notes, and snippets.

@s-tajima /test.php Secret
Created Feb 20, 2015

What would you like to do?
curl memory leak test
<?php
require_once 'HTTP/Request2.php';
function req()
{
$http = new HTTP_Request2("https://google.com/");
$http->setConfig(array(
'follow_redirects' => true,
'max_redirects' => 5,
'timeout' => 10,
'ssl_verify_peer' => false,
'ssl_verify_host' => true,
));
$http->setAdapter('curl');
$http->setMethod(HTTP_Request2::METHOD_GET);
$response = $http->send();
return $response->getBody();
}
req();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment