Who can make this code? IP Blocker
Started on the old forum in September 2012 · view the original in the archive · old links redirect here
Newfine wrote: How to store visitors ip in database and recall it >> if they visit again with same ip they redirect to home page>> and this ip should delete from database in 24hrs.. can anyone try to make this code..?
You simply Want to Make Anti Cheat script, If not Use cookie instead saving ip in database
WapdeviL.iN Most Updated Services Portal.. Want To increase Site Users ???
why does he need to inbox you. if you can really make it. then why not just make it and post here in the thread where he asked for it. this way other people have the chance to either use yours or add another code attempt of it so he has more than one option to choose from.
Tracking/blocking with IP is not a good option, most of us have dynamic external IP's , it changes whenever you disconnect & then reconnect, cookie is a better option.
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID
Here is the script
Hello mr i made it you can try here and want to buy pm me One ip one click
Lue_chin wrote: Hello mr i made it you can try here and want to buy pm me One ip one click
It's cool, But the problem is, a person can make 1000 clicks in 24 hours 😛 by using the intelligent part of his brain 🤝
I need some facebook likes, can you please help me 🤝 http://facebook.com/softwarefreakin I noticed social media is really powerful 🧙 Well DONE is better than well SAID
Lue_chin wrote: Hello mr i made it you can try here and want to buy pm me One ip one click
This is just dumb. I'll not delete it because its the reason why this person should never get any help here anymore, even he got it alot.
Try this.
CREATE TABLE `logs` (
`id` bigint(1000000) NOT NULL auto_increment,
`ip` varchar(15) NOT NULL,
`time` int(10) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
$where = ''; // Where to redirect
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
if (!empty($ip)) {
$time24 = (time() - (24 * 60 * 60));
$check = mysql_query('SELECT COUNT(*) FROM `logs` WHERE `ip` = "'.$ip.'" AND `time` < '.$time24.'');
if (!mysql_num_rows($check)) {
@mysql_query('INSERT INTO `logs` VALUES (\'\', "'.$ip.'", "'.time().'")');
// The rest of page goes here...
} else {
$select = mysql_query('SELECT `id` FROM `logs` WHERE `time` > '.$time24.'');
if (mysql_num_rows($select)) {
while ($sel = mysql_fetch_array($select)) {
@mysql_query('DELETE FROM `logs` WHERE `id` = '.$sel[0].'');
}
}
header('Location: '.$where.'');
exit;
}
} else {
exit('No IP...');
}
... or:
function logs() {
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
if (!empty($ip)) {
$time24 = (time() - (24 * 60 * 60));
$check = mysql_query('SELECT COUNT(*) FROM `logs` WHERE `ip` = "'.$ip.'" AND `time` < '.$time24.'');
if (!mysql_num_rows($check)) {
@mysql_query('INSERT INTO `logs` VALUES (\'\', "'.$ip.'", "'.time().'")');
return false;
} else {
$select = mysql_query('SELECT `id` FROM `logs` WHERE `time` > '.$time24.'');
if (mysql_num_rows($select)) {
while ($sel = mysql_fetch_array($select)) {
@mysql_query('DELETE FROM `logs` WHERE `id` = '.$sel[0].'');
}
}
return true;
}
} else {
return true;
}
}
//
if (logs())
header('Location: http://google.com/');
exit;
If someone have a better idea please post.