0

I want to design a webpage that can be accessed only by specific computers (the ones in my house), otherwise it just prints "Error". Using htaccess I can block I.P addresses that are not mine. However, the I.P address of my computers appear to change every now and then (I guess it's my ISP), so this is not so reliable.

I am using PHP. Is there a way to only allow visitors using my home computers? I want to avoid a login/password scheme.

Saturn
  • 17,888
  • 49
  • 145
  • 271
  • Where is the server? Is it in your house too? – phpmeh Jul 16 '15 at 17:57
  • @phpmeh No it is a remote webhost. It's an actual website out there. – Saturn Jul 16 '15 at 17:58
  • Its called Dynamic IP, means your ISP provides you with an IP that changes. However you might be able to get a Static IP instead. Talk to your ISP. – CodeGodie Jul 16 '15 at 17:59
  • Come up with a code that first checks your current IP. Once you have that IP, compare the IP to the incoming IP. If they match: allow. If not:deny. – CodeGodie Jul 16 '15 at 18:02

1 Answers1

0

This is an issue regarding your ISP. You'll need to call them and request a static IP address for your house. They should give you one without too much hassle. After that, check your external IP address, and then log that to the .htaccess file.

UnstableEagle
  • 562
  • 2
  • 16