4795 Posts in 1980 Topics by 1444 members
|Go to End|
5 October 2011 at 7:10pm
I'm just wondering what is the purpose of the condition in "An Example" checking if the user agent string contains the "+" sign?
It's in line 16 of the code...
if(isset($_SERVER['REMOTE_ADDR']) && ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || ($_SERVER['REMOTE_ADDR'] == '<MyIP>'
&& strpos($_SERVER['HTTP_USER_AGENT'], '+') !== false)))
Thanks very much,
5 October 2011 at 7:54pm
That check was so I was put into dev mode while other people, including those from the same IP as me, weren't. As I was using a custom WebKit build, there was a + in the user agent that any normal browser wouldn't have.
5 October 2011 at 10:03pm
Great - thanks for that explanation Simon.
|Go to Top|