コード例 #1
0
ファイル: functions.php プロジェクト: b-mc-c/LiveQuest
function RemoveIp($ip)
{
    if (IpInConnections($ip) === true) {
        $sql = sprintf("DELETE FROM Connections WHERE IpKey = '%s';", $ip);
        return RunSql($sql);
    }
}
コード例 #2
0
ファイル: CheckSignedIn.php プロジェクト: b-mc-c/LiveQuest
<?php

include 'functions.php';
$ip = $_SERVER['REMOTE_ADDR'];
/*ip address of user */
$message = "";
/*message to be returned*/
/*Check if ip already associated with player in connections table*/
if (IpInConnections($ip) === true) {
    $message = '{"SIGNEDIN" : "SIGNEDIN"}';
} else {
    //the ip does not exist in connections
    $message = '{"SIGNEDIN" : "NOTSIGNEDIN"}';
}
echo $message;