Re: Help me about detect client screen resolution!!!
| From: | Strong Cypher | Date: | Wed, 03 Jan 2007 11:39:12 +0000 |
| Subject: | Re: Help me about detect client screen resolution!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246442@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Just remember in web context is a server-side language ... so you couldn't
have more information than client would want to send to you
in web context, the navigator send some information to the server (like what
navigator, address, proxy, ...)
so ... has David show you, use javascript for example, and can your php
which screen resolution :
index.html:
<script type="text/javascript">
location.href="index.php?h="+screen.heigth+"&w="
+screen.width;
</script>
=> it will redirect to your php script which $_GET['h'] => heigth client
resolution, and $_GET['w'] => width client resolution
have fun
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32) - WinPT 1.0.1
iD8DBQFFm5XdEg3iyspSWPARAiwbAJ9bFE+m/oFAcka236Xnccjzb6YY/ACdFc8G
FuH5WvpqWEEkhMK0cYHhvOc=
=syLI
-----END PGP SIGNATURE-----