I have a little website, using a php login script. People will only be able to see index.html and the login-page if they do not succesfully login. There is no option to register: I am the only one the can register them (by INSERT INTO database).
What I want to do:
I will create a separate account for every person I want to give access to the hidden content (about 5). But! I want to implement into the php-files that when they login, the database will automatically register the IP they're using at that moment.
As soon as everybody had logged in for the first time, I will save the IP adresses and remove the IP-logging code. All I want to do afterwards is "link" their account to their IP adress, meaning they can login from anywhere, but if they're not at the original IP adress they will see a page: "You were logged in successfully, but you do not have the rights to view the hidden content from this internet connection." And if they log in from the original connection, they must be able to see the hidden content.
If someone could write me some code, or give me a link to a tutorial, I would be very gratefull.
