Hm...I'm not sure I completely understand...but I believe that you're trying
to gather as many stats from the client as possible?

What about having a page that is somewhat transparent to the user (if they
support JS) that you have something like this...

<script>
function GetProperties()
{
        document.theform.cVersion.value = navigator.appVersion;
        etc...
        document.theform.submit();
}
</script>

<body onLoad="GetProperties()">
<form action="mainpage.php" method="POST" name="theform">
        <input type="hidden" name="cVersion">
</form>
<img src="/img/a/nice/techno/dancing/woman.gif"><br>
<b>Welcome to my beautiful site! One moment please...</b>
</body>

Then you'd have mainpage.php checkthrough all those values, and possibly
dump them into a DB and create a SESSIONID which each page thereafter uses
the sessionid to lookup the client settings from the db and build the page
based upon that? Depending on how long it takes to set all the hidden fields
and submit the form, it might even be transparent to the user...or...you
might just have a generic front page if no session id is set and popup
window that has all that java script and say something line "Customizing for
YOU!" and then have that page POST to itself and then have the window close
it self (and you've set a cookie with the session id of course) so then each
page that he visits thereafter has the session id set. And you can customize
for him/her...

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-----Original Message-----
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] JavaScript/PHP Function -> Apache/IIS5 -> Client
Properties


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_N
AME"]."?ENETWIZARD_GETCLIENT=TRUE&cName=\"+escape(navigator.appName)+\"&cCod
eName=\"+escape(navigator.appCodeName)+\"&cVersion=\"+escape(navigator.appVe
rsion)+\"&cPlatform=\"+escape(navigator.platform)+\"&cLanguage=\"+escape(nav
igator.language)+\"&cJavaEnabled=\"+escape(navigator.javaEnabled())+\"&cAvai
lHeight=\"+escape(screen.availHeight)+\"&cAvailWidth=\"+escape(screen.availW
idth)+\"&cColorDepth=\"+escape(screen.colorDepth)+\"&cHeight=\"+escape(scree
n.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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to