Skip to content

Instantly share code, notes, and snippets.

@Immortal-
Created August 30, 2013 04:03
Show Gist options
  • Save Immortal-/6386208 to your computer and use it in GitHub Desktop.
Save Immortal-/6386208 to your computer and use it in GitHub Desktop.
Using AuthPanel's api
<?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