NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Creating Interstital Ad Pages

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-10-2005, 03:48 PM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Dec 2003
Location: Chicago
Posts: 1,578
The Equivocate has a spectacular aura aboutThe Equivocate has a spectacular aura about
 



Creating Interstital Ad Pages


Since neither of my advertisers offer interstitial ad pages, I was considering having the page be server-side and just display some large box ads on the interstitial. How would I go about creating this? I need to be able to set the frequency (per hour/day) per visitor and there also needs to be a "Skip" feature just like other advertiser's IA pages. I looked on hotscripts.com and couldn't find anything like it.
__________________
The Equivocate is offline  
Old 02-10-2005, 04:30 PM   #2 (permalink)
Senior Member
 
Kodeking's Avatar
Join Date: Jun 2003
Location: Naperville Illinois
Posts: 1,786
Kodeking is just really niceKodeking is just really niceKodeking is just really niceKodeking is just really nice
 



PHP Code:
<?php
if(isset($_COOKIE["shownad"]) && $_COOKIE["shownad"] == 1)
{
    
header("Location: $url");
    exit();
}else{
    
setcookie("shownad""1"time()+1800);
}
?>
<script language="JavaScript">

<!--
var timer = 10;
var timerID = 0;
var tStart  = null;

function UpdateTimer() {
    if(timerID) {
      clearTimeout(timerID);
      timerID = setTimeout("UpdateTimer()", 1000);
   }
    if(timer == 1)
    {
        timer = timer - 1;
        document.getElementById('seconds').innerHTML = timer;
        document.location = '<?php echo $url?>';
        //do something
    }else{
        timer = timer - 1;
        document.getElementById('seconds').innerHTML = timer;
????: NamePros.com http://www.namepros.com/programming/69367-creating-interstital-ad-pages.html
????: NamePros.com http://www.namepros.com/showthread.php?t=69367
    }
    
}


function Stop() {
   if(timerID) {
      clearTimeout(timerID);
      timerID  = 0;
   }

   tStart = null;
}

function Reset() {
   tStart = null;

   document.getElementById('seconds').innerHTML = timer;
   timerID = setTimeout("UpdateTimer()", 1000);
}

//-->

</script>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<body onload="Reset()" onunload="Stop()">
<center>
The game is loading. There are <span id="seconds"></span>&nbsp;seconds left. (<a href="<?php echo $url?>">Skip loading</a>)<br><br>
Ad code here
</center>
An example can be seen here: http://www.gamedose.com/game_drivers_ed-325.html

Editing the code:
Change "var timer = 10;" to how many seconds you want to wait on the ad page.
Change "setcookie("shownad", "1", time()+1800);" to the number of seconds until the loading page is shown again. Set to 0 for ads to show every time.

Use:
if you save the file as loading.php, use the following url for loading the page:
http://www.yourdomain.com/loading.ph...afterthead.com

If a visitor uses the back button after the destination page loads, it comes back to the ad page. I don't know how to make it go back to the main page when users hit back.
__________________
Quote:
Clan-Forums.com >> $30 BoardingForum.com >> $100
TalkWebHosting.com >> $200 AvoidChapter13.com >> $100
Send PM to make lesser offers on the above names.
Kodeking is offline  
Old 02-10-2005, 06:59 PM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: Dec 2003
Location: Chicago
Posts: 1,578
The Equivocate has a spectacular aura aboutThe Equivocate has a spectacular aura about
 



I was following until you got to the last paragraph about the loading.php and the URL on the end of it. I want it all to be dynamic, and if I'm linking to various news stories (which obviously are continually updated and the URLs change), wouldn't it not work?
__________________
The Equivocate is offline  
Old 02-13-2005, 07:18 PM THREAD STARTER               #4 (permalink)
Senior Member
Join Date: Dec 2003
Location: Chicago
Posts: 1,578
The Equivocate has a spectacular aura aboutThe Equivocate has a spectacular aura about
 



Anyone?
__________________
The Equivocate is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:05 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger