-
-
Save s-tajima/854936acc9526cd812b2 to your computer and use it in GitHub Desktop.
curl memory leak test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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