재

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

· 2011-03-29 (화) 15:14:48 · 2107 · 1
지금 밑에 쿠키소스 중에서 바꾸는거같은데. .잘모르겠습니다
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분까지 쿠키 값을 유효일자를 두고 팝업시 체크를 해두면되듯싶네요
조금만 고민하셔서 짜보시면 성공할실듯싶네요.
댓글을 작성하시려면 로그인이 필요합니다.

자유게시판

203,008건
+
제목 글쓴이 날짜 조회
11-04-22 조회 1,913
11-04-19 조회 2,090
11-04-18 조회 1.1만
11-04-15 조회 1,897
11-04-08 조회 2,092
11-04-07 조회 2,025
11-04-07 조회 2,015
11-04-07 조회 1,619
11-03-31 조회 2,101
11-03-29 조회 2,620
11-03-29 조회 2,108
11-03-29 조회 1,726
11-03-29 조회 5,503
11-03-28 조회 1,798
11-03-26 조회 2,392
11-03-25 조회 2,374
11-03-24 조회 2,722
11-03-24 조회 1,792
11-03-24 조회 2,483
11-03-23 조회 1,888