Results 1 to 6 of 6

Thread: Advertisement rotator for vshare

  1. #1

    Default Advertisement rotator for vshare

    I wanted to create a ad rotator similar to some i have seen witch refreshes the advertisements while the user is still on the page.

    After having increased revenue with this i thought i would share it with everyone!

    Download rotate.zip or rotate.tar and upload the folder and contents to your server so it will be accessible from http://yoursite.com/rotate/

    Open files b1.html to b4.html (add more if needed there is no limit) and change the ad codes with the ones you would like to display (samples of what work are set in the files)
    Change the bottom line of the file to suite your needs >
    Code:
    <meta http-equiv="Refresh" content="15;URL=http://think-porn.info/rotate/rotate.php">
    content="15 -- How often you wish to rotate the ad
    URL=http://think-porn.info/rotate/rotate.php" -- Path to your rotate.php file

    Once you have everything as you need it add the i frame code to where you would like the ads to display

    Code:
    <IFRAME frameBorder="0" SRC="http://think-porn.info/install/rotate.php" WIDTH=500 HEIGHT=150>
    Here you can place a ad just in case the iframe fails
    </IFRAME>
    You can change the size to match your advertisements(tip** make the i frame a little bigger than the add or disable scroll bars)

    More detailed instructions are included in the folders. Hope some of you find this useful

    http://think-porn.info/rotate.tar 10.5kb
    http://think-porn.info/rotate.zip 2.96kb

  2. #2
    Join Date
    Jan 2008
    Posts
    216

    Default

    Thank you AnthOny for sharing with us! ;-)

  3. #3

    Question Anthony, Where can I find this rotate.zip .

    Quote Originally Posted by anth0ny View Post
    I wanted to create a ad rotator similar to some i have seen witch refreshes the advertisements while the user is still on the page.

    After having increased revenue with this i thought i would share it with everyone!

    Download rotate.zip or rotate.tar and upload the folder and contents to your server so it will be accessible from http://yoursite.com/rotate/

    Open files b1.html to b4.html (add more if needed there is no limit) and change the ad codes with the ones you would like to display (samples of what work are set in the files)
    Change the bottom line of the file to suite your needs >
    Code:
    <meta http-equiv="Refresh" content="15;URL=http://think-porn.info/rotate/rotate.php">
    content="15 -- How often you wish to rotate the ad
    URL=http://think-porn.info/rotate/rotate.php" -- Path to your rotate.php file

    Once you have everything as you need it add the i frame code to where you would like the ads to display

    Code:
    <IFRAME frameBorder="0" SRC="http://think-porn.info/install/rotate.php" WIDTH=500 HEIGHT=150>
    Here you can place a ad just in case the iframe fails
    </IFRAME>
    You can change the size to match your advertisements(tip** make the i frame a little bigger than the add or disable scroll bars)

    More detailed instructions are included in the folders. Hope some of you find this useful

    http://think-porn.info/rotate.tar 10.5kb
    http://think-porn.info/rotate.zip 2.96kb

    Hey, where can I get this "rotate.zip". Your link to this file is not working.---Allen:confused:

  4. #4
    Join Date
    Jan 2008
    Posts
    216

    Default

    I re-uploaded the original rotate.zip by Anthony here: http://silkut.com/rotate.zip
    ;-)

  5. #5

    Default Url

    Hello, The URL is not working
    Quote Originally Posted by ramius View Post
    I re-uploaded the original rotate.zip by Anthony here: http://silkut.com/rotate.zip
    ;-)

  6. #6

    Default

    Create a folder called rotate

    Create file called rotate.php in the folder and add the following code

    <?php/*


    */// Make this the relative path to the images, like "../img" or "random/images/".
    // If the images are in the same directory, leave it blank.
    $folder = '';


    // Space seperated list of extensions, you probably won't have to change this.
    $exts = 'html';


    $files = array(); $i = -1; // Initialize some variables
    if ('' == $folder) $folder = './';


    $handle = opendir($folder);
    $exts = explode(' ', $exts);
    while (false !== ($file = readdir($handle))) {
    foreach($exts as $ext) { // for each extension check the extension
    if (preg_match('/\.'.$ext.'$/i', $file, $test)) { // faster than ereg, case insensitive
    $files[] = $file; // it's good
    ++$i;
    }
    }
    }
    closedir($handle); // We're not using it anymore
    mt_srand((double)microtime()*1000000); // seed for PHP < 4.2
    $rand = mt_rand(0, $i); // $i was incremented as we went along


    header('Location: '.$folder.$files[$rand]); // Voila!
    ?>
    Create html files with your advertisiments in the rotate folder (MUST BE HTML FILES) Be sure to add meta refresh on the first line of every html file

    <metahttp-equiv="refresh"content="5">
    Call the advertisments with a i frame Change the size to what you need!!

    <iframe src="rotate/rotate.php" width="770" height="150"></iframe>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •