Last active
August 22, 2018 12:09
-
-
Save dandyraka/a1392def3a4be081bfb35c37be7ae043 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
//CONFIG | |
$CODE = "CODE"; | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://api.sharinggilsblog.org/", | |
CURLOPT_HEADER => 0, | |
CURLOPT_VERBOSE => 1, | |
CURLOPT_AUTOREFERER => false, | |
CURLOPT_REFERER => "http://".$_SERVER['HTTP_HOST'], | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_MAXREDIRS => 10, | |
CURLOPT_TIMEOUT => 30, | |
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | |
CURLOPT_CUSTOMREQUEST => "POST", | |
CURLOPT_POSTFIELDS => "code=".$CODE | |
)); | |
$response = curl_exec($curl); | |
$err = curl_error($curl); | |
curl_close($curl); | |
if ($err) { | |
echo "cURL Error #:" . $err; | |
} else { | |
echo $response; | |
} | |
/* RESPONSE | |
== Login Success == | |
{ | |
status: "ok" | |
} | |
== Login Fail == | |
{ | |
status: "fail" | |
} | |
END */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment