LifeinAsia

msg:4134975 | 10:39 pm on May 18, 2010 (gmt 0) |
By "out of the company's network" do you mean outside the company's IP address range? Or do you mean something else? If the former, then just do a check on the user's IP address. If the later, then hwo is "out of the company's network" defined?
|
geoffb

msg:4135000 | 11:38 pm on May 18, 2010 (gmt 0) |
Hi lifeinasia, Yes outside of the companies network. They don't want internal users to see the login page or even the link to it. Geoffb
|
LifeinAsia

msg:4135006 | 12:02 am on May 19, 2010 (gmt 0) |
You can use $_SERVER["REMOTE_ADDR"] and check against the range of IP addresses the company uses. And even nicer implementation (just in case the user is using a proxy) would be: if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $TheIp=$_SERVER['HTTP_X_FORWARDED_FOR']; else $TheIp=$_SERVER['REMOTE_ADDR'];
|
geoffb

msg:4135164 | 7:41 am on May 19, 2010 (gmt 0) |
Thanks. How is that converted into hiding a logon div panel if the user is within the companies ip range? Geoffb
|
LifeinAsia

msg:4135361 | 3:18 pm on May 19, 2010 (gmt 0) |
You check the user's IP against the company's range. If it's in the range, you don't show the logon panel.
|
londrum

msg:4135369 | 3:26 pm on May 19, 2010 (gmt 0) |
if you cant do IPs, then you can give all the browsers in the building their own user_agent, and check that instead... assuming that the company has control over the browsers. its a five-second job with firefox. never tried with IE.
|
|