mmclaughlin Posted February 7, 2018 Share Posted February 7, 2018 So what I would love to have is the ability to lock down a Frog site by IP address. The thought behind this is that we need to be able to prevent students from accessing a specific site unless they are in the school. It is for testing as well as corrective education. Can this be done in html? Matt Link to comment Share on other sites More sharing options...
Graham Quince Posted February 8, 2018 Share Posted February 8, 2018 This is a tricky one. Right now, due to the many different ways it's possible to host Frog, detecting where the user is in relation is not straight-forward. However, I do know that the following php code: <?php header("Content-Type: text/plain"); print("Your IP address is: " . $_SERVER['REMOTE_ADDR'] . "\n"); print("You connected to: " . $_SERVER['HTTP_HOST'] . "\n"); print("Which internally resolves to: " . gethostbyname($_SERVER['HTTP_HOST']) . "\n"); ?> sits on the Frog server at the top level: https://yourfrogaddress/ipaddress.php It might be possible then to use the HTML widget to check this page, split the contents to get the IP address in Javascript, then hide elements based on the result. Link to comment Share on other sites More sharing options...
mmclaughlin Posted February 9, 2018 Author Share Posted February 9, 2018 So what you are saying is that we may be able to pull this and do a query that compares IP to IP and if IP matches then it shows PDF if it does not, it shows a statement that it can be only accessed in the school. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now