.

Scripts tạo quảng cáo popup xuất hiện 1 lần/1 ngày/1 ip


Scripts tạo popup hiện 1 lần 1 ngày 1 ip
Hiện nay để tránh tình trạng các đối tác chuộc lợi bất chính từ các hợp đồng quảng cáo các công ty cung cấp dịch vụ quảng cáo đã áp dụng các điều luật dành cho hình thức always on top như chỉ chấp nhận thanh toán với những click xuất hiện 1 lần/1 ngày/1 ip máy tính. Như vậy nếu có mở nhiều lần cũng chỉ được tính một lần. Vạy tại sao ta không giới hạn số lần mở của sổ popup với tàn xuất 1 lần/1 ngày/1 ip để tránh gây phản cảm cho dộc giả truy cập vào blog của bạn.

» Cách tạo quảng cáo popup chỉ xuất hiện 1 lần duy nhất trong 1 ngày với 1 địa chỉ ip!


1. Đăng nhập vào tài khoản Blogger
2. Vào phần Mẫu (Template)
3. Chọn chỉnh sửa HTML (Edit HTML)
4. Tìm thẻ mở sau:
<body>
- Thay thế đoạn code vừa tìm được thành 1 trong 2 đoạn code bên dưới:
Code 1:
<body onclick='popunder();'>
<script>
/* <![CDATA[ */
function Set_Cookie(a,b,c,e,f,g){var d=new Date;d.setTime(d.getTime());d=new Date(d.getTime()+c);document.cookie=a+"="+escape(b)+(c?";expires="+d.toGMTString():"")+(e?";path="+e:"")+(f?";domain="+f:"")+(g?";secure":"")}function Get_Cookie(a){var b=document.cookie.indexOf(a+"="),c=b+a.length+1;if(!b&&a!=document.cookie.substring(0,a.length)||-1==b)return null;a=document.cookie.indexOf(";",c);-1==a&&(a=document.cookie.length);return unescape(document.cookie.substring(c,a))} function Delete_Cookie(a,b,c){Get_Cookie(a)&&(document.cookie=a+"="+(b?";path="+b:"")+(c?";domain="+c:"")+";expires=Mon, 11-November-2020 00:00:01 GMT")}
function popunder(){null==Get_Cookie("cucre")&&(Set_Cookie("cucre","cucre Popunder","1","/","",""),
pop=window.open("http://namkna.blogspot.com/","windowcucre"),
pop.blur(),window.focus())}function addEvent(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener?a.addEventListener(b,c,!0):a["on"+b]=c} addEvent(window,"load",function(){addEvent(document.body,"click",function(){popunder()})});
/* ]]> */
</script>

Code 2: 
<script>
//<![CDATA[
function Set_Cookie(name, value, expires, path, domain, secure) {
var today = new Date();
today.setTime(today.getTime());
var expires_date = new Date(today.getTime() + (expires));

document.cookie = name + "=" + escape(value) +
((expires) ? ";expires=" + expires_date.toGMTString() : "") +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "") +
((secure) ? ";secure" : "");
}

function Get_Cookie(name) {

var start = document.cookie.indexOf(name + "=");
var len = start + name.length + 1;
if ((!start) &&
(name != document.cookie.substring(0, name.length))) {
return null;
}
if (start == -1) return null;
var end = document.cookie.indexOf(";", len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len, end));
}

function Delete_Cookie(name, path, domain) {
if (Get_Cookie(name)) document.cookie = name + "=" +
((path) ? ";path=" + path : "") +
((domain) ? ";domain=" + domain : "") +
";expires=Mon, 11-November-1989 00:00:01 GMT";
}

function popunder() {
if (Get_Cookie('cucre') == null) {
Set_Cookie('cucre', 'cucre Popunder', '1', '/', '', '');
var url = "http://namkna.blogspot.com/";
pop = window.open(url, 'windowcucre');
pop.blur();

window.focus();
}
}

function addEvent(obj, eventName, func) {
if (obj.attachEvent) {
obj.attachEvent("on" + eventName, func);
}
else if (obj.addEventListener) {
obj.addEventListener(eventName, func, true);
}
else {
obj["on" + eventName] = func;
}
}

addEvent(window, "load", function (e) {
addEvent(document.body, "click", function (e) {
popunder();
});
});
//]]>
</script>
<body onclick='popunder();'>
- Thay http://namkna.blogspot.com/ thành URL trang quảng cáo bạn muốn mở trong cửa sổ Popup.
Share on Google Plus

About Unknown

Có nhiều người nói, 1 số thì bảo mình biến thái , 1 số lại nói mình lập di ,còn 1 số người lại bảo mình hơi kỳ quái vì lý do mình thích ngắm sưu tầm và nếu có cơ hội là chộp luôn . Nhưng mình thích vì điều đó sở thích mình là như zậy ở đâu có áo dài là lảng vảng đâu đó có mặt mình 1 linh hồn bí ẩn .. khà khà Mình rất vui khi mình được ngắm và chiêm ngưỡng Áo Dài Việt Nam 1 sở thích Bất diệt nơi Tâm hồn ... ^^
    Website Comment
    Facebook Comment

0 comments:

Post a Comment