Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've build a PHP web application which I only want my wife and I to have access too. Adding password protection adds an unnecessary user step - is it possible to restrict the page to certain devices (e.g. our iPhones, iPad and MacBook) regardless of wifi / 3G network etc.

I don't think PHP can determine MAC address - so is there a suitable method other than password protection?

Thanks,

Mike

EDIT

Some further info to help clarify:

The server is running on Debian/Linux (The RaspBMC off-shoot of Raspbian to be precise).

I need access from anywhere, home and out and about.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
589 views
Welcome To Ask or Share your Answers For Others

1 Answer

There are actually ways to get the user's MAC address, but these can be spoofed anyway.

I would recommend making a cookie, for you and her, and requiring data from it (like a key) as authentication, with it updating every now an then.

Updating it would protect against people that had manged to get a copy of the cookie (somehow...) from using it forever.

It could also be something like sending every request with a 'automated' username/password/auth key, into the post or get variable, to be checked by the server. Also has downfalls, as someone could be sniffing your packets. But at that point, you probably have bigger problems.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...