| | 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. |
|
|
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: CODE <? $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.
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...
Similar Topics
Keywords : ip blocking php code
I need some help with adding a PHP Code into my Website. I need to get a code to add in someones IP Don't read bellow (not the responses either if you haven't read this book!!!) - The movie is already underway!... For those interested, there is also a book about the book!... I am calling a profile pic to a custom page and it sometimes caches to an older pic because the Hi Guys.. I'm Playing Cat Women :cry: huh :roll: very dificult any one know the cheat code Hi does anyone have a browser direction code( so if someone went to my site with IE it would forward OKIDOKIE CLICK HERE ... With this you can protect your source, but i don't like it.I want everybody can view my source so do you belive what yes all programmers distribute your code program all go more faster all pepole QUOTE %4F%6B%2C%20%4E%6F%77%20%74%68%69%73%20%69%73%20%68%61%72%64%20%3A%50% Anyways, I've played around with some binary, and made a large binary sentence. If you can Hi there, I'm trying to get the source code of a page hosted on another domain using JS. I've After Microsoft ditched WinFS from Longhorn, I started to wonder about wether or not it would be How can i add BB code and Smileys to my script??? plz help! thnk!... Do you know one good program who can tell you a code of specific color? Like: (some color)=#CC2564... can someone help me with a php&mysql password code for my web page??? An example should be Hi, I have that security code thing on my website, yet I have no idea how. I installed a few I noticed you add a google banner in the phpbb forum. I use the same forum, and I want to add a link maintenance, there are alot of website that use forum PhpBB. You can download at I like this, who'll share one? Thanks... Looking for ip, blocking, php, code
|
![]() IP Blocking with PHP code |
| ADD REPLY / Got an Opinion! | a humble request :-) | RAPID SEARCH! | Free Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute your information that might help someone here. Ask your Doubts & Queries to get answers.. "Together, We enlight each other!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|