You have entered too few informations to expect getting specific answer.
Try to use curl
like this:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.gamesite.com/login");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"username=value1&password=value2&function=authenticate");
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$login_output = curl_exec ($ch);
curl_close ($ch);
if ($login_output == "OK") { ... } else { ... }
But you should check at least source code of website to find out the variable names and correctly added them to postfields.
If you have the account, you can login and check firebug site tab to find out how the server respond if ok and use it in $login_output