...

View Full Version : looking for simple code to unban ip



ajloun
09-15-2009, 09:05 PM
Hello

I have Some Bad IPs Banned thru .htaccess , i need simple file to unban some people from the file htaccess by tyeping the ip in a box and hit submit , i do it now manualy by downloading the htaccess and then look for the ip i need to unban .. there should be Easy way .. Right ..

Maybe somthing like this but not sure

<?php
if ($_POST['unbanme'] == "the Victim IP")
{
remove_blacklist($REMOTE_ADDR);
?>

function

function remove_blacklist ($ip)
{
global $blacklist_file, $htaccess;

{

Coyote6
09-16-2009, 12:23 AM
Maybe try using php to open the .htaccess file, then use preg_replace to delete it, and save the version back to the file. I don't know if it will allow you to because I have never tried, but seems like a BIG security risk if it is allowed to.

ajloun
09-16-2009, 03:26 AM
thx .. no worry i have workaround way ..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum