The Giant Midget
Junior Member
- Jan 17, 2009
- 195
- 40
This url has to be put on the content locker (in the JS file). Then it will redirect inside it. If it's well done, you won't even see the redirection.
I did put the url in the JS file. We are supposed to send traffic to that same url, right? I'm going to post my JS file here, please tell me if there's anything wrong with it:
Code:
var Delay = 0;//Seconds after them clicking the link, the gateway vanishes.
var AppearDelay = 10;//Seconds before gateway appears
var oldHistLength = history.length;
var stop_scroll = false;
var once_per_session=1;
var unknown=true;
//determine visitors country
if (geoip_country_name()=='United States') {
us();
unknown=false;
}
if (unknown==true)
{ad='<div id="gatewayDimmer"></div><div id="gatewaydiv"><ul id="OfferList"><div align="center"><table cellpadding="0" cellspacing="0" bgcolor="#0000FF" width="354" height="281"><!-- MSTableType="layout" --><tr><td> </td><td valign="top" height="23"><p align="center"><a class="offerlink" href="#" color="#FF0000" face="Arial Black" style="text-decoration: none"><b><font color="#FF0000" face="Arial Black">X</font></font></b></td></tr><tr><td valign="top" colspan="2" height="233"><p align="center" style="margin-top: 0; margin-bottom: 3px"><font color="#FFFFFF" size="5"><b>Were Sorry, but since youre outside of the United States, were unable to show you our premium content. </b></font></p><p align="center" style="margin-top: 0; margin-bottom: 3px"> </p><p align="center" style="margin-top: 0; margin-bottom: 3px"><font color="#FFFFFF" size="5"><b>Get a US proxy and youll be able to view all of our premium content!</b></font></td></tr><tr><td width="301"> </td><td height="25" width="53"> </td></tr></table></div></div>'}
//end country determinations
//Each country has it's own function. Within each countries function are
//the ads to rotate between. So the "us" function has two ads to rotate between
//simply add other functions for each county, and then add ads for
//each country to rotate between.
function us()
{ads =
[
'<div id="gatewayDimmer"></div><div id="gatewaydiv"><ul id="OfferList"><div style="overflow: hidden; width: 615px; height: 87px; position: relative;" id="i_div"><iframe name="i_frame" src="http://thehandlerdomain.c0m/?url=http://CPAoffer.c0m/lnk.asp?o=23422&c=443259&a=8408&referer=http://theWHdomain.c0m" style="border: 0pt none ; left: -333px; top: -496px; position: absolute; width: 1280px; height: 615px;" scrolling="no"></iframe></div></ul></div>'
]
ad = ads[Math.floor(Math.random()*ads.length)]
}
//end ads for different countries
//don't edit anything past this line
function setcookie() {
if (unknown==false){
document.cookie="alerted=yes"
}
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function alertornot(){
if (get_cookie('alerted')==''){
loadalert();
}
}
function loadalert(){
delayappearance();
}
if (once_per_session==0)
loadalert()
else
alertornot()
setInterval ( "checkHistory()", 1000 );
function checkHistory()
{
if (oldHistLength != history.length)
{
removegateway();
oldHistLength = history.length;
}
}
function scrolltop(){
if(stop_scroll==true){
scroll(0,0);
}
}
function delayappearance()
{
setTimeout("setupgateway()", AppearDelay*1000);
}
function setupgateway()
{
stop_scroll = true;
window.scrollTo(0,0);
document.body.style.overflow = "hidden"
var Left = $(window).width() /2;
Left = Left - $('#gatewaydiv').width()/2;
var Top = $(window).height() /2;
Top = Top - $('#gatewaydiv').height()/2;
$('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline');
$('#gatewayDimmer').width($('html').width());
$('#gatewayDimmer').height($('html').height());
$('#gatewayDimmer').css('display','block');
setTimeout("setcookie()", AppearDelay*6000);
}
function removegateway()
{
stop_scroll = false;
document.body.style.overflow = ""
$('#gatewaydiv').css('display', 'none');
$('#gatewayDimmer').css('display','none');
}
$(document).ready(function()
{
$('.offerlink').click(function()
{
setTimeout('removegateway()', Delay*1000);
});
});