Blocking an IP - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Blocking an IP (/showthread.php?tid=23497) Blocking an IP by DJeX on 04-09-2004 at 09:45 PM Does anyone know of a good IP blocker in php that will block IP's from your site? RE: Blocking an IP by Digirat on 04-09-2004 at 09:58 PM why don't you use htaccess? i'm assuming you're already running apache due to the php you're asking for RE: Blocking an IP by sock on 04-10-2004 at 02:27 PM
IIS has (crappy) PHP support too... RE: Blocking an IP by Wabz on 04-10-2004 at 04:18 PM RE: Blocking an IP by DJeX on 04-10-2004 at 04:34 PM Where can I edit the htaccess? Or do I have to make one? RE: Blocking an IP by Anubis on 04-10-2004 at 04:37 PM Couldn't a JavaScript code do the same if PHP is unsupported? RE: Blocking an IP by reisyboy on 04-10-2004 at 04:40 PM How can you block IP on ur PC? Is it in the HOSTS? RE: Blocking an IP by sock on 04-10-2004 at 05:28 PM
quote:You need to make one... You can make several ones and put them in different directories. But I don't know much about .htaccess so I can't help you with that really. quote:Theoretically, it could do something of the sort, but it would be quite stupid to do it that way. You'd have to print the IP address in the code somewhere, which again requires PHP (or other server-side script)... And the banned user could still read the source or simply disable JavaScript. It's stupid. quote:No, that simply acts as DNS cache which overrides DNS lookups on your computer. It can be abused to block access to certain domain names from your PC (by pointing them to localhost or something), but not actual IP addresses. You'd have to use a firewall to do that. RE: Blocking an IP by Anubis on 04-10-2004 at 05:36 PM
quote:Not if they guy's a n00b, but I see your point... RE: Blocking an IP by stonesour on 04-10-2004 at 06:43 PM
I use this code: Then in your index file or whatever put this include code: Change the header location bit to the redirect site, bannedip.php to the name of your script. You can also just display text using the echo command.. RE: Blocking an IP by sock on 04-10-2004 at 08:04 PM
Here's an adaptation of stonesour's ip_check(), with strict proxy support: RE: Blocking an IP by reisyboy on 04-10-2004 at 08:34 PM
quote: Ahh right right right, ok well thats good enough for me, i want to restrict certian websites on certian computers (Sisters been asked to by dad) So ill just put the domians i want blocked in her pc's HOSTS RE: Blocking an IP by CookieRevised on 04-11-2004 at 02:49 AM
quote:No, you can't in JavaScript. It's useless... Like sock said: the user could disable the javascript and the block is lifted... Furthermore, JavaScript is client-side... PHP is server-side... You can only block someone/IP's with a server-side language... RE: Blocking an IP by DJeX on 04-11-2004 at 03:35 AM
I decided to use .htaccess to block people |