Here's a demo of how this works:
I thought this might be useful for someone. This is what I use as a gateway on my sites. Basically this works as a popup that forces the visitor to enter their e-mail/zip or any other information. This code was taken from another site where the discussion was "how to create an unblockable popup". This is considered to be a very hard to block popup because to be honest, it is not. It smells and taste like a good old fashioned popup but it's not.
The popup is basically a hidden div (ad) by default on the stylesheet, and later (you can define the timer) we use javascript to change the hidden value to "visible".
This popup can be closed after 60 seconds, when another popup button shows up. If you click this button the stylesheet changes again from "visible" to "hidden" and the visitor gets to see the website.
You can also assign different offers to different countries. In this example code I'm only targeting US visitors with a iframe of google dot com. If you're coming from another country you'll see a simple banner. I'm currently using this on a site for a very famous mmorpg where I get a lot of Russian, Greek visitors. You just need to add the line:
As for the iframe code you can do it manually or using cakeslice/GodCPA or whatever method you want. Don't forget to fake the referrer on the iframe url.
Here's the code:
If you need help setting this up post on the thread for everyone to see.
Code:
http://www.bhtests.dreamhosters.com/gateway/
I thought this might be useful for someone. This is what I use as a gateway on my sites. Basically this works as a popup that forces the visitor to enter their e-mail/zip or any other information. This code was taken from another site where the discussion was "how to create an unblockable popup". This is considered to be a very hard to block popup because to be honest, it is not. It smells and taste like a good old fashioned popup but it's not.
The popup is basically a hidden div (ad) by default on the stylesheet, and later (you can define the timer) we use javascript to change the hidden value to "visible".
This popup can be closed after 60 seconds, when another popup button shows up. If you click this button the stylesheet changes again from "visible" to "hidden" and the visitor gets to see the website.
You can also assign different offers to different countries. In this example code I'm only targeting US visitors with a iframe of google dot com. If you're coming from another country you'll see a simple banner. I'm currently using this on a site for a very famous mmorpg where I get a lot of Russian, Greek visitors. You just need to add the line:
Code:
else if (geoip_country_code() == "RU") {
document.write("NEW CONDITION");
}
//Change US to RU if you are targeting RU visitors
Here's the code:
Code:
<html>
<head>
<title>My Gateway</title>
<script src="http://j.maxmind.com/app/geoip.js" type="text/javascript"></script>
<script type="text/javascript">
function showad() {
window.setTimeout('showad2()',1000);
}
function showad2() {
document.getElementById("ad").style.visibility = "visible"
}
</script>
<script type="text/javascript">
function showclose() {
window.setTimeout('showclose2()',60000);
}
function showclose2() {
document.getElementById("close").style.visibility = "visible"
}
</script>
<style type="text/css">
#ad { background:#fff ; text-align:center; border:10px solid #DC3522 ; color:#000 ; font-family:sans-serif ; padding:20px 5px ; position:fixed ; top:20px ; left:20px ; width:95% ; height:90% ; visibility:hidden ; z-index:1 }
#close { visibility: hidden; }
#text_top1_title { font-family:georgia, serif; color:#3B200F; font-size:16px; font-weight:bold; line-height:125%; text-align:center; }
#normal_text { font-family:georgia, serif; color:#381704; font-size:10px; letter-spacing:0.1em; line-height:200%; padding-top:11px; }
#last_text { color: #000; font-size: 10px; margin: 5px; font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif; font-size: 11px; }
#text_top2 { font: bold 26px "Century Schoolbook", Georgia, Times, serif; color: #333; line-height: 90%; margin: .2em 0 .4em 0; letter-spacing: -2px; }
#warn2 { font-family: courier, sans-serif; font-size: 10px; padding: 10px; }
</style>
</head>
<body onload="showad();">
<div id="ad">
<script type="text/javascript">
if (geoip_country_code() == "US")
{
document.write("<div id='text_top1_title'>OOPS! Houston, we have a problem!<br /> <div id='normal_text'>YOU HAVE TO SUBSCRIBE OUR NEWSLETTER TO ACCESS OUR CONTENT...</div><br /><div id='last_text'>Don't worry, we will only contact you if some scandal happens...</div></div> <!-- Hello Input Iframe Here!!! IFRAME START --> <div style='overflow: hidden; width: 592px; height: 69px; margin-left:auto; margin-right:auto; position:relative;' id='i_div'><iframe name='i_frame' src='http://www.google.com' style='border: 0pt none ; left: -394px; top: -176px; position: absolute; width: 1280px; height: 576px;' scrolling='no'></iframe></div><br / ><!-- IFRAME END --> <div id='normal_text'>Please allow one moment for the e-mail validation process...<br />After validation you will be able to close this window!</div>");
}
else
{
document.write("<!-- IF OUTSIDE USA TRY ANOTHER OFFER HERE --> <div id='text_top2'>Click the image below to visit the greatest site ever<br /><br /></div><a href='#'><img src='banner.png' width='auto' border='0'></a><br /><div id='warn2'>After clicking the banner above you'll be able to close this popup and watch our content.</div>");
}
</script>
<div id="close">
<a href="#" onclick="document.getElementById('ad').style.visibility='hidden'"><img onload="showclose()" onclick="document.getElementById('close').style.visibility='hidden'" src="img/close.png" border="none"></a>
</div>
</div>
Implement this on your site/blog or simply insert your content here. <br />
</body>
</html>
If you need help setting this up post on the thread for everyone to see.
Last edited: