Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
no-captcha
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CENTER-TBI
no-captcha
Commits
4793d54a
Commit
4793d54a
authored
Dec 06, 2014
by
Abhimanyu Sharma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
curl instead of file_get_contents
If you like we can take advantage from guzzle library
parent
0be8cd8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
src/NoCaptcha.php
src/NoCaptcha.php
+6
-1
No files found.
src/NoCaptcha.php
View file @
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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment