I tried <?php echo $HTTP_USER_AGENT; ?> but I didn't get an "answer" just the string <?php echo $HTTP_USER_AGENT; ?>
sugarkane
2:50 pm on Jul 31, 2001 (gmt 0)
If you had this in a file.php then it shows that your site isn't set up for PHP :(
toadhall
3:31 pm on Jul 31, 2001 (gmt 0)
Try this:
<? $browser = getenv("HTTP_USER_AGENT"); if ($browser) { echo ("Browser: $browser\n"); } else { echo ("Sorry, no can do!"); } ?>
Of course if PHP is not available you won't get the "no can do line" anyway but,... Why not just ask your ISP? ;)
sugarkane
3:39 pm on Jul 31, 2001 (gmt 0)
If the host hasn't set the server up for PHP, it's 99% certain that any files with a .php extension would be treated as text files - ie the <?php echo $HTTP_USER_AGENT; ?> will actually be output by your browser as plain text.
Acternaweb
3:43 pm on Jul 31, 2001 (gmt 0)
Thanks, guess they don't have it set up for php because when I go to the page, it tries to download itself.
: (
toadhall
4:13 pm on Jul 31, 2001 (gmt 0)
You might try, as one last test, a .php extension, then again with a .php3 extension. Version 4.x accepts the former; version 3.x the latter.