Commit 4793d54a authored by Abhimanyu Sharma's avatar Abhimanyu Sharma

curl instead of file_get_contents

If you like we can take advantage from guzzle library
parent 0be8cd8d
......@@ -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