Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 8 of 8
  1. #1
    Platinum Lifetime Member

    Join Date
    Jun 2005
    Location
    UK
    Posts
    18
    DNF$
    241
    Bank
    0
    Total DNF$
    241
    Donate  

    Need a banner handling script, ideas?

    I've been searching the ~hotscript sites but was wondering if anyone here had any better suggestions.

    Here's what I want to do and what I'm after...

    Have a database of 20 advertisers, each with a link and banner image.
    Display these banners at random on my homepage, one at a time.

    Allow visitors to select any of the 20 advertisers via links labelled "Advertiser 1 / 2 / 3 / 4 / 5".. and so on from the homepage.

    Have each banner impression counted for each advertiser and displayed publically on a different page. Updated in realtime or every ~5 minutes.

    eg. name.com/stats.php
    Advertiser 1 - 256 impressions
    Advertiser 2 - 75 impressions
    Advertiser 3 - 501 impressions
    Advertiser 4 - 385 impressions

    Also for the clicks to be monitored but to be kept in an admin panel.
    I'd like to offer both redirects and direct links (non countable of course) for SE purposes.


    Any ideas what would be able to offer this or am I looking at a custom built solution only?

    Thanks

  2. #2
    David Ausman
    DavidAusman's Avatar
    Join Date
    May 2005
    Location
    127.0.0.1
    Posts
    853
    DNF$
    1,494
    Bank
    0
    Total DNF$
    1,494
    Donate  

    Re: Need a banner handling script, ideas?

    I think this type of script does not exist. You probably need to customly built

  3. #3
    www.LOL.biz
    Bender's Avatar
    Join Date
    Apr 2004
    Location
    .ro
    Posts
    1,912
    DNF$
    6,242
    Bank
    0
    Total DNF$
    6,242
    Donate  

    Re: Need a banner handling script, ideas?

    I think you'll need a custom built script.

  4. #4
    Exclusive Lifetime Member
    SouthernTn's Avatar
    Join Date
    Feb 2005
    Location
    Tennessee
    Posts
    2,329
    Country

    United States Add SouthernTn on Facebook
    DNF$
    778
    Bank
    0
    Total DNF$
    778
    Donate  

    Re: Need a banner handling script, ideas?

    Just go with PHP Ads..
    NerveWrecker.com - Vegetarian For A Week Challenge

  5. #5
    Gold Lifetime Member

    Join Date
    Oct 2004
    Posts
    204
    DNF$
    340
    Bank
    0
    Total DNF$
    340
    Donate  

    Re: Need a banner handling script, ideas?

    I've written a script that does this.


    -------------------------- ROTATOR.PHP ----------------------------


    <?php

    // BANNER ROTATOR V1.0
    // Displays multiple advertisers banners on your site by how many credits they have
    // License : Freeware
    // Banners are randomly displayed from directory ROTATOR
    // Credits count down and banners stop displaying when their credits are used up
    // Requires your server to run PHP and your web page must have extension .php

    // INSTALL
    // Upload this file as rotator.php
    // Create directory rotator under the directory where this script is used
    // Create a text file rotator/rotator.txt
    // Make the 1st line CREDITS BANNER URL
    // Insert the following line where you want the banner displayed on your page
    // <?php include("rotator.php"); ? >
    // (no space between ? >)

    //---------------------------------------------------------- ------------

    // Example of rotator.txt

    // CREDITS BANNER URL
    // 90 mbannr.gif www.milliondollarhosting.com
    // 95 games1.gif www.gamesandstuff.com
    // 0 sharkfins.gif www.sharks.com

    // If all credits are 0 then 1st banner is displayed
    // For free advertising you can set default banner(s) with 999999999 credits

    $strFile1 = "rotator/rotator.txt";

    //---------------------------------------------------------- ---------------

    // open for read
    $objFH = fopen( $strFile1, "r" );
    $strBuffer1 = fread( $objFH, filesize( $strFile1 ) );
    fclose( $objFH );

    // tally number of banners with credits, by counting rows in rotator.txt
    $myeof = true;
    $tosay = $strBuffer1;
    $numbanners = -1;
    while ($myeof) {

    $nextret = strpos($tosay, "\n");
    $say = substr($tosay, 0, $nextret);
    $tosay = substr($tosay, $nextret+1);
    if ($say[0] != '0') $numbanners++;
    if (strpos($tosay, "\n") == 0) $myeof=false;

    }

    //---------------------------------------------------------- ----------------

    // select banner and subtract 1 credit from rotator.txt
    $myeof = true;
    $tosay = $strBuffer1;
    $checked = 0;
    $selectedban = "";
    $freeban = "";
    $strBuffer2 = "";
    while ($myeof) {

    $nextret = strpos($tosay, "\n");
    $say = substr($tosay, 0, $nextret);
    $tosay = substr($tosay, $nextret+1);
    $pcred = strpos($say, " ");
    $pban = strpos($say, " ", $pcred+1);
    $creds = substr($say, 0, $pcred);
    $bans = substr($say, $pcred+1, $pban-$pcred-1);
    $urls = substr($say, $pban+1);

    // 1 chance in number-of-remaining-banners to be selected
    if (($selectedban=="") && is_numeric($creds) && (rand($checked, $numbanners-1) == $checked)) {

    if ($creds > 0) {
    $tax = 0 - 1 + $creds;
    $selectedban = $bans;
    $selectedurl = $urls;
    }
    else {
    $tax = 0;
    }
    $strBuffer2.= $tax . " " . $bans . " " . $urls . "\n";
    if ($freeban == "" ) {
    $freeban = $bans;
    $freeurl = $urls;
    }
    }
    else {
    $strBuffer2.= $say . "\n";
    }

    if (is_numeric($creds) && ($creds>0)) $checked++;
    if (strpos($tosay, "\n") == 0) $myeof=false;

    }

    if ($selectedban == "") {
    $selectedban = $freeban;
    $selectedurl = $freeurl;
    }

    //---------------------------------------------------------- --------------

    // open for write
    $objFH = fopen( $strFile1, "w" );
    fwrite( $objFH, $strBuffer2 );
    fclose( $objFH );

    ?>

    <a href="http://<? echo $selectedurl; ?>"><img src="rotator/<? echo $selectedban; ?>" height=60 width=468
    border=0></a>
    Let me know if it works, no admin panel just edit rotator.txt directly.

  6. #6
    Platinum Lifetime Member

    Join Date
    Jun 2005
    Location
    UK
    Posts
    18
    DNF$
    241
    Bank
    0
    Total DNF$
    241
    Donate  

    Re: Need a banner handling script, ideas?

    Thank you Gray, could be exactly what I'm after. The project idea I had isn't due to begin for a few weeks but once I find the time to get it going I'll report back/PM you.

  7. #7
    The Bishop
    namestrands's Avatar
    Join Date
    Jan 2005
    Location
    Langley, VA
    Posts
    4,053
    DNF$
    3,312
    Bank
    0
    Total DNF$
    3,312
    Donate  

    Re: Need a banner handling script, ideas?

    Quote Originally Posted by jmst
    Thank you Gray, could be exactly what I'm after. The project idea I had isn't due to begin for a few weeks but once I find the time to get it going I'll report back/PM you.
    You should also consider http://phpadsnew.com/two/

    it is probably the best adserver I have EVER used..
    Enterprise Communications and Social Media in Uist

  8. #8
    DNF Newbie

    Join Date
    Nov 2003
    Posts
    2
    DNF$
    78
    Bank
    0
    Total DNF$
    78
    Donate  

    Re: Need a banner handling script, ideas?

    Have a look at RevSense.
    http://w3matter.com/
    Iken

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
  •  

Domain name forum recommended by Domaining.com