Forum Moderators: phranque

Message Too Old, No Replies

IP's and me

are they really as unique as they say?

         

eman

1:24 am on Jun 11, 2004 (gmt 0)

10+ Year Member



My question isn't very complex, but before I go implimenting admin stuff right on my homepage when my IP is detected, I wanted to see if anybody knows of there ever being two the same IP adress ever. My plan is to PHP detect the IP, and if it's mine, automatcally include buttons that only the admin should have, like one click forum blocks and stuff like that. Anyway, I'm on broadband, so I already have a static IP. I understand that on dialup the ISP assigns a new IP to you everytime you log on, but it can only be one of that ISP's allotted IP adresses, right? Is there any way to fake an IP or to every have the same IP as someone else ever. Is every single IP unique?

isitreal

2:17 am on Jun 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is every single IP unique

Yes, it has to be, that's how your requests find you on the web. When you make a request, it includes your ip, that's how the request is returned to you. The web depends on unique ip addresses. However, in many cases if you are on a subnet, you will have an ip address that is unique on the subnet, but not on the larger net, but if you have a real static IP address that would not be an issue as far as I know, since the request hits the web from the gateway of the subnet, using the gateway IP, I think that's how it works anyway if I remember right.

Don't assume your address is static just because you're on broadband though, if you didn't order a static ip address you don't have a static ip address, it just doesn't change very often. Why don't you add a password feature to the admin panel, set a cookie, check your ip, then you'd be more or less completely safe.

eman

4:05 am on Jun 11, 2004 (gmt 0)

10+ Year Member



thanks for the help. I don't know how to set cookies just yet. I'm still learning. But I could set up a login in my admin folder (password protected folder) that could send some kind of "admin mode unlocking" form variable to my homepage. I think that'll be what I do.

Thanks again.

-EMAN

TheDoctor

10:45 pm on Jun 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My plan is to PHP detect the IP, and if it's mine, automatcally include buttons that only the admin should have

You're also going to have to think about how you handle this if you're accessing your home page remotely, or if you replace your PC.

I'm not sure you wouldn't be better off setting up a separate (password-protected) admin page. This is what I do.