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

Merge pull request #3 from abhimanyusharma003/patch-1

curl instead of file_get_contents
parents 0be8cd8d 4793d54a
......@@ -101,7 +101,12 @@ class NoCaptcha {
{
$link = static::VERIFY_URL.'?'.http_build_query($query);
$response = file_get_contents($link);
$curl = curl_init();
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);
}
......
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