Commit c884fdaf authored by Nguyễn Văn Ánh's avatar Nguyễn Văn Ánh

Merge pull request #8 from anhskohbo/revert-3-patch-1

Revert "curl instead of file_get_contents"
parents 55d8c60f e2954102
...@@ -101,12 +101,7 @@ class NoCaptcha { ...@@ -101,12 +101,7 @@ class NoCaptcha {
{ {
$link = static::VERIFY_URL.'?'.http_build_query($query); $link = static::VERIFY_URL.'?'.http_build_query($query);
$curl = curl_init(); $response = file_get_contents($link);
curl_setopt($curl, CURLOPT_URL, $link);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$response = curl_exec($curl);
curl_close($curl);
return json_decode($response, true); return json_decode($response, true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment