I'm trying to authenticate users using a PHP script. Up until recently, it was working fine. I did change web hosts recently, so that might be related.
function BlocklandAuthenticate($username)
{
$postdata = http_build_query(
array(
'NAME' => $username,
'IP' => $_SERVER['REMOTE_ADDR']
)
);
printf("%s\n", $postdata);
$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);
printf("%s\n", "RESULT: " . $result);
return $result;
}
The correct data is sent to blockland.us, but $result is blank. Any ideas?