JavaScript/PHP Function -> Apache/IIS5 -> Client Properties

From: Date: Sun, 28 Jan 2001 01:24:30 +0000
Subject: JavaScript/PHP Function -> Apache/IIS5 -> Client Properties
Groups: php.general 
Request: Send a blank email to php-general+get-37068@lists.php.net to get a copy of this message
I need to get a whole bunch of client properties from a visitor on my site before a page is displayed. I do this using JavaScript. I first determine if the visitor's browser supports JavaScript, and if it does I run a function that basically builds a temporary page and returns a bunch of client properties for me. Here's the code: if ($Browser_JavaScriptOK == TRUE) { echo "<HTML>"; echo "<HEAD>"; echo "<TITLE>[ Swift eNetwork ] eNetWizard : Determining Client Properties</TITLE>"; echo "<SCRIPT LANGUAGE=\"JavaScript\">"; echo "function GetProperties()"; echo "{"; echo "window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_NAME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCodeName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVersion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(navigator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvailHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availWidth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(screen.height)+\"&cWidth=\"+escape(screen.width)+\"&cPixelDepth=\"+escape(screen.pixelDepth));"; echo "}"; echo "</SCRIPT>"; echo "</HEAD>"; echo "<BODY BGCOLOR='#000000' OnLoad=\"GetProperties()\">&nbsp;"; echo "</BODY>"; echo "</HTML>"; exit; } This code is run and then goes back to the calling page with all of the variables. I then process the variables and put them into a class and build the page. This works on IIS5, but when I try to do this on Apache, it freezes up and after a time comes back with an error message saying PHP.EXE did something wrong and will be closed. Can anyone tell me what is happening? Do you know of any other way to reliably return client properties? Thankz... _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com

« previous php.general (#37068) next »