Popup açılacak sayfa içerisinde verdiğim kodları uygun yerlere yapıştırman gerekiyor.
<?php
if (isset($_COOKIE["popup"])==false)
  setcookie("popup", "evet");
  $popup=true
?>
<html>
<head>
<script language="javascript">
function popupac()
{
        en=150
        boy=150
        URL="http://www.google.com.tr"
        day = new Date();
        id = day.getTime();
        eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" + en + ",height=" + boy + ",left = 450,top = 275');");
}
</script>
</head>
<body <? if($popup); echo "onload='popupac()'"; ?> >
</body>
</html>
Buradaki işlem.
Kullanıcı sayfayı çağırdığında kullanıcı tarafına bir çerez gönderilip gönderilmediğine bakılıyor.Eğer gönderilmemiş ise bir çerez gönderilip popup açma işlemi aktif oluyor.
Kullanıcı ikinci kere siteye girdiğinde çerez gönderildiğinden herhangi bir şey olmuyor.