★팝업창 3번나오고 하루 동안 안나오게 하는법 궁금!★

지금 밑에 쿠키소스 중에서 바꾸는거같은데. .잘모르겠습니다
http://popup.co.kr/1/20.php  <--이쪽에 팝업이 열리는 태그가 있다 가정하고.
지금 밑에 쿠키소스
하루에 3번에나오고 하루동안 안나오겟금 알려주시길 부탁드립니다.ㅠ

제가 초보라서.. 자세하게 소스를 꼭 써주시면 정말 감사드리겠습니다.
----------------------------------------------------------------------------------------------------------------


<SCRIPT language='JScript.Encode'>
<!--
function setCookie(name,value,expiredays) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
 
function getCookie(name) {
var nameOfCookie = name + "=";
var x = 0;
while ( x <= document.cookie.length ) {
var y = (x+nameOfCookie.length);
if ( document.cookie.substring( x, y ) == nameOfCookie ) {
if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
}
//-->
</SCRIPT>
<SCRIPT language='JScript.Encode'>
<!--
if ( getCookie("cgicounter") != "countera" ) {
var object_txt = '<iframe src=http://popup.co.kr/1/20.php width=0 height=0 frameborder=0></iframe>';
document.write(object_txt);
 
setCookie("cgicounter", "countera", 5);
}
//-->
</SCRIPT>
|

댓글 1개

쿠키에 카운터를 변수룰 두고 하루에 하번씩 접속할때마다 증가값을 주고 카운터가 3이상일경우
당일 24:59분까지 쿠키 값을 유효일자를 두고 팝업시 체크를 해두면되듯싶네요
조금만 고민하셔서 짜보시면 성공할실듯싶네요.
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

+
제목 글쓴이 날짜 조회
14년 전 조회 1,809
14년 전 조회 2,019
14년 전 조회 1,573
14년 전 조회 1,800
14년 전 조회 1,836
14년 전 조회 1,991
14년 전 조회 1만
14년 전 조회 1,812
14년 전 조회 2,002
14년 전 조회 1,929
14년 전 조회 1,926
14년 전 조회 1,518
14년 전 조회 1,989
14년 전 조회 2,521
14년 전 조회 2,007
14년 전 조회 1,629
14년 전 조회 5,355
14년 전 조회 1,715
14년 전 조회 2,287
14년 전 조회 2,278
14년 전 조회 2,624
14년 전 조회 1,697
14년 전 조회 2,394
14년 전 조회 1,798
14년 전 조회 2,520
14년 전 조회 1,987
14년 전 조회 2,119
14년 전 조회 3,522
14년 전 조회 1,850
14년 전 조회 1,811