Location: PHPKode > scripts > Pop under class > simple_example.php
<?php
/************************************************************* 
 * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com 
 * Fee free to distribute and modify code, but keep reference to its creator 
 * 
 * Pop under class allows you to implement pop under advertising to your website.
 * You can customize probability of ads to appear, time for how long to show advertisement and much more.
 * Language and template files included to provide full outlook customization
 * 
 * For more information, examples and online documentation visit:  
 * http://webcodingeasy.com/PHP-classes/Implement-pop-under-advertising-to-your-site-using-pop-under-class
**************************************************************/

//declaring class instance
include("./pop_under.class.php");
$popunder = new pop_under();

//putting in link to show with optional title text
$popunder->add_url("http://code-snippets.co.cc/", "Code snippets");
$popunder->add_url("http://www.phpclasses.org/browse/author/838850.html", "Arturs Sosin's PHP classes");

//for testing purpose visitors won't be marked
$popunder->use_mark(false);

//and of course showing ads
//put this before any other output
$popunder->show_ads();


//and some content goes here
echo "<p>Content</p>";
echo "<p>Default probability of popunder to appear is 10% on every pageview, so just keep refreshing till you get it ;)</p>";
echo "<p><a href='?id=".($_GET['id']+1)."'>Goto ".($_GET['id']+1)."</a></p>";

?>
Return current item: Pop under class