View Full Version : Little Help Tool
GhettoT
11-27-2006, 08:58 PM
OK, so obviastly some people have javascript disabled, their browser doesn't support JS, or anything else like that. And i was noticing that on DD's "tool" page at the bottom it says "Your IP is...." ad your Your browser user agent....." So I am wondering is their an HTML/PHP snippets you could add to your source so that it runs through a series of if/then commands to decide whether to load a JS "filled" page or a plain "non-JS" page. I guess this could go in either the PHP forums or the HTML. So MODS do what you please with this thread...
Thanks
-GT
djr33
11-27-2006, 09:14 PM
You can't, to my knowledge, check if javascript is enabled through other languages, including php.
The way to do that is to use Javascript to check.
If the javascript checks and works, then it will either redirect or set a cookie or just change the page to the "javascript" version, and if the javascript does not work, it won't be able to check and it will fail, thereby not doing anything to the page.
There might be more complex ways as well...
As for the other things, look here:
http://us3.php.net/manual/en/reserved.variables.php
(Lots of things under $_SERVER should help.)
and for example, <?php echo $_SERVER['REMOTE_ADDR']; ?> for IP.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.