function BlocklandAuthenticate($username){ //Zapk 12270 $postdata = http_build_query( array( 'NAME' => $username, 'IP' => $_SERVER['REMOTE_ADDR'] ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('http://auth.blockland.us/authQuery.php', false, $context); return $result;}
$authstring = BlocklandAuthenticate($_POST['user_name']); $autharray = explode(' ',trim($authstring)); if($autharray[0] == "YES"){ $blid = $autharray[1]; //allow registration or whatever}else{ //give them an error and deny registration}
This is useful, but shouldn't it belong in the coding section as a resource?
It's not TorqueScript, so not really.
whats this useful for?