Harryz's Blog

New Version 2012 – Wordpress Site

RT : Putting @Twitter’s “Do Not Track” feature in context: via

Facebook
RSS

Code Mở Popup trên WEBSITE

Jan - 11 - 2012
821 views

Code này sẽ bật popup theo IP
Mỗi IP chỉ bật popup 1 lần (tránh khó chịu cho khách)

function Set_Cookie(name, value, expires, path, domain, secure) {
    var today = new Date();
    today.setTime(today.getTime());

    if (expires) {
        expires = expires * 1000 * 60 * 60 * 12;
    }
    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=Thu, 01-Jan-1970 00:00:01 GMT";
}

function popunder() {
    if (Get_Cookie('vnsTraGopLT6')) {
        return false;
    } else {
        Set_Cookie('vnsTraGopLT6', 'vnsTraGopLT PopUnder', '1', '/', '', '');
        urls = ["http://yourdomain.com"]
        var url = urls[Math.floor(Math.random() * urls.length)]
        params = 'width=' + screen.width;
        params += ', height=' + screen.height;
        params += ', top=0, left=0,scrollbars=yes'
        params += ', fullscreen=yes';

        pop = window.open(url, 'window', params).blur();
        window.focus();
        return false;
    }


– save thanh file popup.js
– Upload lên host
– Chèn vào temp

 

<body onclick="popunder();">
<script type="text/javascript" src="http://domain.com/popup.js"></script>


 

8 Responses so far.

  1. Thanks for your opinion on this, i also agree with you say and wish to read more from what you think.

  2. Fantastic beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog web site? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear ideaI am extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Either way keep up the excellent quality writing, it’s rare to see a great blog like this one nowadays..

  3. This is very interesting, You’re a very skilled blogger. I’ve joined your rss feed and look forward to seeking more of your excellent post. Also, I’ve shared your website in my social networks!

  4. Good Post. I have read a lot of posts on this subject and you done the best job. Keep it up!

  5. Collier says:

    Excellent post. I was checking constantly this blog and I’m impressed! Extremely useful information specifically the last part :) I care for such info much. I was looking for this particular info for a long time. Thank you and good luck.

  6. Hey there, You’ve done an incredible job. I’ll definitely digg it and personally recommend to my friends. I’m sure they’ll be benefited from this site.

  7. I think i understand what your saying but would love to talk more on this, please send me an email if your interested.



Advertisement

  • Cheap reliable web hosting from WebHostingHub.com.
  • Domain name search and availability check by PCNames.com.
  • Website and logo design contests at DesignContest.net.
  • Reviews of the best cheap web hosting providers at WebHostingRating.com.

So sánh iPad Gen 3 và iPad 2

iPad Gen 3 ra đời mang trong mình nhiều cải tiến về các tính năng bên trong, giúp chúng ta ...

Làm đẹp desktop với bộ h

Mang làn gió mới đến cho màn hình máy tính nào... Bước sang tháng 3 rồi, chúng mình hãy mau chóng tút ...

Dùng thử và cảm nhận Wind

Windows 8 vừa chính thức ra mắt với phiên bản thử nghiệm cho người dùng Consumer Preview  tại triển lãm ...

Adobe Photoshop Touch v1.1 for Ip

Phần mềm chỉnh sửa ảnh đầu tiên trên iOS hỗ trợ layers. Try it. $9.99 Category: Photo & Video Released: Feb 27, 2012 Version: ...

Chuyển đổi trực tuyến Vi

HearYoutube là dịch vụ chuyển đổi trực tuyến chạy trên nền web, giúp bạn chuyển đổi bất kì đường dẫn ...