Created
August 30, 2013 04:03
-
-
Save Immortal-/6386208 to your computer and use it in GitHub Desktop.
Using AuthPanel's api
This file contains 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 | |
//Get string from website | |
function getString($url){ | |
$ch=curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); | |
$returnval = curl_exec ($ch); | |
curl_close ($ch); | |
return $returnval; | |
} | |
//Make an authcode from your site | |
function makeAuthcode($name){ | |
$salt = 'specific_to_your_site'; | |
$url = "http://authpanel.pw/api.php?m=m&u=$name&ss=$salt"; | |
$authcode = getString($url); | |
return $authcode; | |
} | |
//for more documentation on what you can do with the api please take a look at http://authpanel.pw/api.php | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment