Well I am desiging an anti-cheat for the game combat arms. What i want to do is 'ping' the program with the database so that people cannot simply create a program that makes it seem as though they are using the anti-cheat.
Is there a way to 'encrypt' or stop other people simulating the connection easily? I am not great with PHP and this is how it adds it so far:
public function Update()
{
$ign = $_GET['ign'];
$timestamp = $_GET['uid'];
$time = time();
if(($time - 10 < $timestamp) && ($time + 10 > $timestamp))
{
$this->connection();
$data = mysql_query("SELECT * FROM users WHERE ign = '{$ign}'");
if(mysql_num_rows($data) > 0)
{
mysql_query("UPDATE users SET lastonline = '{$time}' WHERE ign = '{$ign}'");
}
else
{
mysql_query("INSERT INTO users (id, ign, lastonline) VALUES ( NULL, '{$ign}', '{$time}' ) ");
}
echo "Connected to database";
}
else
{
echo "Problem connecting";
}
}
I need some sort of way to protect it/make it hard to crack quickly. And once cracked I can easily change, hope this has provided enough information!