Post: [TUT] Account Protection (Anti Account Sharing)
05-10-2011, 01:02 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
Originally posted by 039

Hello dude,

I'm currently working on a scanner "Dionysos Scanner"
And, To protect everyaccount from sharing.
I coded this function
Explaination, It's simply grabbes the Server provider information
Latiture:Longitude:Country and I allow every IP from the same city.

Maybe it will help someone.

        public function ipChecker()
{
$content = file_get_contents("https://whatismyipaddress.com/ip/".$_SERVER['REMOTE_ADDR']);
$host = explode("\n",$content);
// strip_tags(); because I insert thats data in my database so it's not really beatifull to see HTML code :/ Remove it for an echo. I started using it without strip_tags(); so that why you can see <br />.
$final_info = strip_tags($host[58-1]."<br />".$host[59-1]."<br />".$host[60-1]."<br />".$host[61-1]."<br />".$host[62-1].$host[63-1]);
$time = date("d/m/Y - H:m:s");

$array = mysql_fetch_array(mysql_query("SELECT * FROM ip_logs WHERE id_user= {$_SESSION['user_id']}"));

$row = mysql_num_rows(mysql_query("SELECT * FROM ip_logs WHERE id = {$_SESSION['user_id']}"));
if($row != 0)
{
mysql_query("INSERT INTO ip_logs VALUES('','".$_SERVER['REMOTE_ADDR']."','$final_info','".$_SESSION['user_id']."'Winky Winky");
return;
}

if($array['ip_info'] !== $final_info)
{
mysql_query("UPDATE users SET is_banned = '1' WHERE id = {$_SESSION['user_id']}");
mysql_query("INSERT INTO attemps_ip VALUES('','".$_SERVER['REMOTE_ADDR']."','$final_info','".$_SESSION['user_id']."','$time'Winky Winky");
}

elseif($array['ip_info'] == $final_info)
{
return;
}

}



source You must login or register to view this content.
05-10-2011, 01:11 AM #2
What about help, some account sharing is accepted by both people.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo