Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 27th, 2000, 05:43 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:

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

Reply With Quote
  #2  
Old July 27th, 2000, 05:15 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #3  
Old August 1st, 2000, 01:36 PM
JustinD JustinD is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: Fargo
Posts: 1 JustinD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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).]

Reply With Quote
  #4  
Old August 2nd, 2000, 08:34 AM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
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.

Reply With Quote
  #5  
Old August 2nd, 2000, 08:37 AM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
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.

Reply With Quote
  #6  
Old August 3rd, 2000, 02:39 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #7  
Old August 3rd, 2000, 03:33 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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.

Reply With Quote
  #8  
Old August 3rd, 2000, 04:37 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
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).]

Reply With Quote
  #9  
Old August 8th, 2000, 05:30 PM
123finder.com 123finder.com is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Posts: 73 123finder.com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Designing Advertisements and Banners Rotation program ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway