cyberfrs adlı üyeden alıntı: mesajı görüntüle
Bildiğim kadarıyla PHP ile yapılamıyor. En basiti javascript ile çözünürlğü alıp, reklamı ayrı bir dosyadan PHP'e çözünürlüğü gönderip yayınlamak.

JS örnek :
var screenWidth = window.screen.width,
screenHeight = window.screen.height;
çok teşekkür ederim, şöyle bir kod buldum. bunu nasıl bir döngü içine alabilirim?

 <?php
session_start();

if (!isset($_SESSION[iterate]))
{
if(!isset($HTTP_COOKIE_VARS["users_resolution2"])) 

//means cookie is not found set it using Javascript 
{ 
$_SESSION[iterate]=1; 
?> 
<script language="javascript"> 
<!-- 
writeCookie(); 

function writeCookie() 
{ 

var the_cookie = "users_resolution2="+ screen.width +"x"+ screen.height; 

document.cookie=the_cookie 

location ='<?php echo $_SERVER['PHP_SELF'];?>'; 
} 
//--> 
</script> 
<?php 
} 
else{
$screen_resolution = $HTTP_COOKIE_VARS["users_resolution2"]; 
} 
}
else{
$screen_resolution = $HTTP_COOKIE_VARS["users_resolution2"]; 
} 
echo $screen_resolution; 
?>