haolan Posted August 5, 2007 Share Posted August 5, 2007 Hi php freaks I'm sorry if you do not understand my language, but i am from Denmark, and it has bin a while since i last wrote in english. Please ask if there is something you do not understand. I need some kind of method to log in automatically from a computer, when entering my login site. The computers will always be the same, so if it is possible to get any kind of keyfile or something to read in automatically and compare the contents with some data in the MySQL database on the webserver when entering the site, it would be great. Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/ Share on other sites More sharing options...
yarnold Posted August 5, 2007 Share Posted August 5, 2007 Are you on a fixed IP address? If so you could have.. <?php if($_SERVER['REMOTE_ADDR'] == 'xx.xxx.xxx.xxx') { // Logged in } ?> Obviously replacing xx.xxx.xxx.xxx with your IP address. Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/#findComment-316202 Share on other sites More sharing options...
haolan Posted August 5, 2007 Author Share Posted August 5, 2007 Im not sure if all the users have a fixed IP on their line.. Is there any other way to do it? Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/#findComment-316210 Share on other sites More sharing options...
dbillings Posted August 5, 2007 Share Posted August 5, 2007 set a cookie and as long as they don't delete it. Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/#findComment-316213 Share on other sites More sharing options...
EagleAmerican Posted August 6, 2007 Share Posted August 6, 2007 You could use their hostname instead of IP. Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/#findComment-316359 Share on other sites More sharing options...
redarrow Posted August 6, 2007 Share Posted August 6, 2007 http://uk2.php.net/setcookie set a cookie for user login deatails where it never runs out. Quote Link to comment https://forums.phpfreaks.com/topic/63448-log-in-from-a-specific-computer/#findComment-316362 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.