PDA

View Full Version : Page only allows certain # of IPs, redirects rest... HOW?


Ricky158
11-23-2002, 09:31 PM
i've tried a password gate, but that was anything but secure. "View Source" got the viewer any information from usernames to passwords. i want to have a page in which only the designated user, and myself can access it, based on our IPs. i know the user's IP(s) and i certainly know mine, so i'll just substitute them in later.

it's just a password gate, only modified to be on each "spin-off" page, instead of the password gate at the hub page. i'll substitute in the URL to redirect to later, after i have a script to work with.

also, please allow it to have multiple IPs allowed, labeled as something like "IP1, IP2, IP3, IP4, and IP5". just to be safe, i'm going to assume between my two computers and their X amount of computers, they total five, i can always take the excess out.

thanks.

PS; i've got this thread on "Email Notification" so any replies will be promptly replied to by me, in case anyone has a question about the script.

ConfusedOfLife
11-23-2002, 11:23 PM
I actually don't think that you can do this with JS and it should be a server side language, let's see what others say!

Ricky158
11-24-2002, 12:03 AM
ohhh, i get it. so JS cant actually get someone's IP to try to match it? if it could, the rest is easy.

whammy
11-24-2002, 12:29 AM
JS can't get a person's IP, since it's client-side, and in order to get an ip the server has to do it.

At the very least, you have to use SSI (server-side includes) with javascript (and an .shtml page) - but if someone turns off javascript, there goes your idea anyway.

The safest protection if you don't have a server-side language is to use a username/password which is the name of the page you're going to... that way it isn't in the source.

Look at the "post a javascript" forum, there's kind of a neat twist on that commonly used technique there.