#1
  1. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)

    hai all,
    i m designing one program that will rotate my advertisement gifs and links ...
    I wrote a perl program ....as a Server Side include in my Apache ...
    I adopted this logic...

    1.Store gif file Paths and Links in a Hash as like this

    $gif_and_link = (
    "/tutorial/java.html"=>"/img/advt1.gif",
    "/tutorial/perl.html"=>"/img/advt2.gif",
    "/tutorial/php.html"=>"/img/advt3.gif",
    );

    Now it is having three links ..will be extended.

    Now my problem is how can i make printable in SSI ?

    Anybody with better logic and idea please help me in solving this problem?

    vijay
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Start here -> http://www.scriptsearch.com/pages/l9c2c7.shtml

    There are many ways to do it. However, the best way is to try some of the free ad scripts and steal the idea/logic.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Fargo
    Posts
    1
    Rep Power
    0
    You can achieve banners in SSI's by a little cheat. In the SSI, have the javascript src be a perl script. In the .pl, write your html linking code to a temp file. The code would be document.write commands, then do a redirect like: Location: tbanner.jsnn

    That will allow you to rotate banners and still use a SSI.

    [This message has been edited by JustinD (edited August 01, 2000).]
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    The best logic (IMO) is to create a flat file database with several fields for information like id number, number of times displayed, number of times clicked, the location of the banner, the link.. and things like that. Then just make the cgi execute every time the page loads just have it generate a random number with a maximum of your highest id number (number should be an integer too). Then once that number's made up have it go to the flat file database, select that ad, print the display (ad+link) and add one to the number of times displayed.

    To track click you'd need to make a redirect.pl type script that you link to like redirect.pl?3 where 3 would be the id number of the ad. redirect.pl would then add 1 to the count of the click through column in your database and redirect (using the "Location: <A HREF="http://www.asdf.comnn";" TARGET=_blank>http://www.asdf.comnn";</A> method) to the appropriate site.

    All these things help you analyze you ads and things that happen to them.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    You might also ad a column for zone so that you can track where the most hits are coming from. If you had multiple sites running on the same server and running the same banner program, you could track more stats about that site and it's success.
  10. #6
  11. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)
    hai

    i decided to develop my own ad rotation program here.

    This program will echo a Link and Image in the .shtml file....

    It is the first step to design where should i store the data?
    In seperate text file or in seperate hash?

    Both the designs are having their own pros and cons.Storing in text file will cause some more time but it is easy to maintain.
    Storing in Hash is not easy to handle but hard to maintain .. I prefer to store in Hash.
    Anybody having suggestions?

    vijay
  12. #7
  13. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    If you are concern about the speed and ease of maintenance, choose separate files. That's what I would do.

    You can also go to http://www.scriptsearch.com/pages/l9c2c7.shtml and download a few of ad scripts and see which method they use.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    The best method would be do use something like mysql to store the info in, but that might be a little beyond what your thinking of using.

    [This message has been edited by JonLed (edited August 03, 2000).]
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    73
    Rep Power
    14
    Yeah, if the host supports MySQL, it would be quite easy+efficient to use MySQL.
    Or if you want to use flat file, I recommend WebAdvert, you can get the link at cgi-resources.com
    There are a whole bunch of scripts there. Moreover, there are ratings which arr very helpful

    ------------------
    http://new.123finder.com/ - Helps you find cool domains for FREE & Registers it for only $14.95/yr
    http://www.guideclick.com/ - Qualified webmaster resources (affiliate programs, web design, tips)

    ------
    Son

IMN logo majestic logo threadwatch logo seochat tools logo