Get visitors screen size php
RegisterLogin
Get visitors screen size php
Post Description: Get visitors screen size php
Tags: Get, visitors, screen, size, , php
This Post Was Posted On Apr 11, 2008 By screen sise #1350
Post Description: Get visitors screen size php
Tags: Get, visitors, screen, size, , php
This Post Was Posted On Apr 11, 2008 By screen sise #1350
Get visitors screen size php by screen sise
my buddy told me its possible but i dont know if he's telling the truth
i know you can do it with javascript but i want to be able to get that information on server size instead of client side
if you know this. please tell me
im writing this php script and it would really help if you can tell me
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
hostman
#1769 1
yes you can do it with php
here is a scrip we wrote to show you
just copy and past this code into a notepad and save it as webune-screensize.php and upload to your website and open it with your browser
here is a scrip we wrote to show you
just copy and past this code into a notepad and save it as webune-screensize.php and upload to your website and open it with your browser
<HTML>
<TITLE>Getting User's Screen Resolutions with PHP Script Code Sample Example</TITLE>
<HEAD>
<?
######## __________________________ ###########
######## SCRIPT BY WEBUNE.COM #################
######## PLEASE DO NOT REMOVE THIS ############
######## __________________________ ###########
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_resolution = $HTTP_COOKIE_VARS["users_resolution"];
else //means cookie is not found set it using Javascript
{
?>
<script language="javascript">
<!--
writeCookie();
function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2010");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
location = 'show-user-screen-resolution-php.php.php';
}
//-->
</script>
<?
}
?>
</HEAD>
<style type="text/css">
<!--
.style1 {color: #0000FF}
.style2 {color: #0066FF}
.style3 {color: #CC0000}
-->
</style>
<BODY>
<h1 align="center" class="style2"><strong>Your Screen Resolutions is set to:</strong> <?php echo $screen_resolution; ?></h1>
<div align="center">Turotial by <a href="http://www.wallpaperama.com">Wallpaperama.com</a></div>
<hr size="2" noshade>
<p>Hello and Welcome to this Wallpaperama "Get User's Screen Resolution" Script.</p>
<p>As webmaster, we often need to get the user's screen resolution to make our visitor's expirience more enjoyable and fun.</p>
<p>One way wallpaperama has implemented this, is to customize specific webpages to our visitors depending on the computer screen resolution
setting or properties.</p>
<p>The PHP function to do this is: <span class="style1">isset</span>(<span class="style2">$HTTP_COOKIE_VARS</span>[<span
class="style3">"users_resolution"</span>])</p>
<p><a href="http://www.wallpaperama.com/"><< Go Back</a> </p>
<p align="center">PHP Hosting by <a href="http://www.webune.com">Webune.com</a> </p>
<p>
</BODY>
</HTML>
<TITLE>Getting User's Screen Resolutions with PHP Script Code Sample Example</TITLE>
<HEAD>
<?
######## __________________________ ###########
######## SCRIPT BY WEBUNE.COM #################
######## PLEASE DO NOT REMOVE THIS ############
######## __________________________ ###########
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_resolution = $HTTP_COOKIE_VARS["users_resolution"];
else //means cookie is not found set it using Javascript
{
?>
<script language="javascript">
<!--
writeCookie();
function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2010");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
location = 'show-user-screen-resolution-php.php.php';
}
//-->
</script>
<?
}
?>
</HEAD>
<style type="text/css">
<!--
.style1 {color: #0000FF}
.style2 {color: #0066FF}
.style3 {color: #CC0000}
-->
</style>
<BODY>
<h1 align="center" class="style2"><strong>Your Screen Resolutions is set to:</strong> <?php echo $screen_resolution; ?></h1>
<div align="center">Turotial by <a href="http://www.wallpaperama.com">Wallpaperama.com</a></div>
<hr size="2" noshade>
<p>Hello and Welcome to this Wallpaperama "Get User's Screen Resolution" Script.</p>
<p>As webmaster, we often need to get the user's screen resolution to make our visitor's expirience more enjoyable and fun.</p>
<p>One way wallpaperama has implemented this, is to customize specific webpages to our visitors depending on the computer screen resolution
setting or properties.</p>
<p>The PHP function to do this is: <span class="style1">isset</span>(<span class="style2">$HTTP_COOKIE_VARS</span>[<span
class="style3">"users_resolution"</span>])</p>
<p><a href="http://www.wallpaperama.com/"><< Go Back</a> </p>
<p align="center">PHP Hosting by <a href="http://www.webune.com">Webune.com</a> </p>
<p>
</BODY>
</HTML>
Apr 11, 2008 Reply Report abuse
©2011 Webune Forums - Sun Dec 18, 2011 6:49 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3