iGuest 3 Report post Posted January 23, 2005 Is there any way known to anyone about blocking IP addresses for a range that Admin can define in order to protect the site from being attaced by someone?Thanks,Eyal. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 23, 2005 yeah... erm i am just about to make a script to do it... though it will integrate into my site so i wont be able to give it to you, what i can do is point you in the right direction (as far as i know)...first, the users ip can be found by: <?$ip_address = getenv('REMOTE_ADDR');?>you should set the value ranges for each of the 4 numbers to allow.Im goign to store these as a minimum row and a maximum row in a table.Now...When the page is loaded, compare the $ip_address of the current user by splitting it up to get each of the 4 numbers...if all of the 4 numbers fit within the range assigned to all of the 4 numbers... show the content. If not print user is banned. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 23, 2005 Thanks for the tip, However I'm afraid I am still new with PHP...I understand you security priorities and respect that, but is there another way without programing a certain code like a module for instance...Why people dosen't interest in such option to protect their site... I guess they wake up too late after someone does hack and destroy thier site... Share this post Link to post Share on other sites