/    Sign up×
Community /Pin to ProfileBookmark

simple IP blocker

i really need a simple IP blocker, i found javascript ones butt hey never work any ideas?

to post a comment
Full-stack Developer

6 Comments(s)

Copy linkTweet thisAlerts:
@The_CheatMar 14.2004 — there are quite a few ways... probably most common is using .htaccess (i think)

check this link for more info on .htaccess http://www.wsabstract.com/howto/htaccess5.shtml


also another way would be to store a list of ip's in a text file or a database, and then using a server-side language you could compare the users current ip against the list of ip's in the database, and if there is a match you could just kill the script.

i hope this helps!
Copy linkTweet thisAlerts:
@modifier_guyauthorMar 15.2004 — so basicly i make a .htaccess file and put that stuff in there and i am done? or do i need to link it or what

also i need a IP logger so it logs peoples IP
Copy linkTweet thisAlerts:
@David_HarrisonMar 15.2004 — If you have ASP enabled on your server then you can use this Request.ServerVariables("REMOTE_ADDR") to detect a users IP address and redirect them or send them different content or whatever you want.

Edit, if you want to log peoples IP then you will definately need some sort of server-side language capability so that you can store the IP's in a database. If you have Microsoft Access then you can create a database for use with an AS script. [url=http://www.brinkster.com]brinkster[/url] are a reasonably good host, although PeOfEo would probably recommend [url=http://europe.webmatrixhosting.net/text.aspx?tmpl=about]webmatrixhosting[/url], however that's ASP.NET, I can't help you with that.
Copy linkTweet thisAlerts:
@The_CheatMar 15.2004 — if you want to log peoples IP then you will definately need some sort of server-side language capability [/quote]
unless he has access to the servers logs.

If you have ASP enabled on your server then you can use this Request.ServerVariables("REMOTE_ADDR") to detect a users IP address and redirect them or send them different content or whatever you want. [/quote]
just a note, in php it's: $_SERVER['REMOTE_ADDR']
Copy linkTweet thisAlerts:
@modifier_guyauthorMar 16.2004 — i am running www.host.sk it has worked well for me so far, i just want a simpl blocker n recoder.
Copy linkTweet thisAlerts:
@David_HarrisonMar 16.2004 — Looks as though you have PHP support. The Cheat can probably help you out with that.
×

Success!

Help @modifier_guy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...