I'm going to be implementing two things this week for a website. One will be a Top Sites script, the other will be a banner ad rotation script. I'm looking to get last-minute feedback about the best way to go.
For the Top Sites, I'm thinking of going with Top Sites Pro from www.solutionscripts.com It's not cheap ($250 or so) but seems to be very high-quality.
As for the banner ad one, I'm torn between Central Ad and WebAdverts. I'm going to be serving up around 15,000 impressions a day. Cost isn't too much of an issue but I want something that's easy to work with. I'm running IIS on NT if that matters.
CentralAd -- No Support. They recently updated their Whois contact to remove their phone number. It is now listed as 000-000-0000.
WebAdverts is a PERL Script, and is therefore very inefficient for serving ads since the entire script needs to be compiled each time it is run. I'm not sure whether it will run on NT or not...
Take a look at http://www.aspin.com/home/webapps/admanage for some ASP solutions that will run on NT. I have heard that AdMentor and AdShark are both good. AdShark requires a server side component though.
------------------
Wayne Luke
SitePoint Moderator ICQ 29015947
You can try this out (I just hope it pastes ok)
--------------------------------------------
Here is some quick code to build a Banner Rotator in ASP. It displays large (468
X 60) banners, Button (88 X 31) ads, and text ads. You can also tell it to
display a random ad or a particular ad by ID.
This is the code that actually builds the advertisements from the database. I
would place it in an include files (i.e. includes.asp) and link it in to the
pages you want to display ads in.
'----- Create and Open Connection
Set adServer = Server.CreateObject("ADODB.Connection")
adServer.ConnectionString = "DSN=ads;DBQ=" &_
"D:\path\to\database.mdb;DriverId=25;" &_
"FIL=" MSAccess;" &_
"MaxBufferSize=512;PageTimeout=5;UID=admin;"
adServer.Open
'----- Pick Ad from database
if adDisplay = 0 then 'Choose a random Ad
SQLBanners = "Select * from Banners WHERE Type=" & BType
Set Banners = Server.CreateObject("ADODB.Recordset")
Banners.CursorType = adOpenStatic
Banners.LockType = adLockOptimistic
Banners.Open SQLBanners, adServer
'----- Increment Shown field value
Banners("Shown") = Banners("Shown") + 1
Banners.Update
else 'Choose a hardcoded Ad
SQLBanners = "Select * from Banners WHERE BannerID=" & adDisplay
Set Banners = Server.CreateObject("ADODB.Recordset")
Banners.CursorType = adOpenStatic
Banners.LockType = adLockOptimistic
Banners.Open SQLBanners, adServer
'----- Increment Shown field value
Banners("Shown") = Banners("Shown") + 1
Banners.Update
end if
'----- Create and display Response
Select BType
Case 1: 'Large 468 X 60 banners
ImageString = "<img src=""" & Banners("Image") &_
"""height=""60"" width=""468"" border=""0"" alt=""" & _
Banners("Hint") & """>"
ResponseString = "<p align=""center"" class=""advertisement""><a" &_
"target=""dmad"" href=""/includes/adtracker.asp?" &_
"BannerID=" & Banners("BannerID") &_
""">" & ImageString & "</a><br>" &_
Banners("Hint") & "</p>"
Case 2: '88 X 31 Button Ads
ImageString = "<img src=""" & Banners("Image") &_
"""height=""31"" width=""88"" border=""0"" alt=""" & _
Banners("Hint") & """>"
ResponseString = "<p align=""center"" class=""advertisement""><a" &_
"target=""dmad"" href=""/includes/adtracker.asp?" &_
"BannerID=" & Banners("BannerID") &_
""">" & ImageString & "</a></p>"
Case 3: 'Text Ads
ResponseString = "<span class=""advertisement""><a" &_
"target=""dmad"" href=""/includes/adtracker.asp?" &_
"BannerID=" & Banners("BannerID") & """> &_
Banners("Hint") & "</a></span>"
Case else:
ResponseString = "Error in Advertising Application - Illegal Ad Type"
End Select
Response.Write ResponseString
Response.Flush
'----- Clean up memory
Banners.Close
adServer.Close
Set Banners=Nothing
Set adServer=Nothing
End Sub
%>
[/code]
The pages have to be .asp pages as well. To
link in the code add the following line near the top:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
<!--include virtual="/includes.asp">
[/code]
To display an ad just put:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
<% call doAD(btype, bannerid %>
[/code]
With the appropriate values where you want the ad displayed.
The following code updates the "clicked attribute" of the banner so you can
track how many times people clicked on it. Place it in a separate file called
adtracker.asp. Of course it opens in a new window and redirects the user to the appropriate site as well.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
<%@ Language=VBScript %>
<%
Dim adServer, Banners, SQLBanners
Dim URL
Response.Buffer=True
'----- Create and Open Connection
Set adServer = Server.CreateObject("ADODB.Connection")
adServer.ConnectionString = "DSN=ads;DBQ=d:\path\to\database.mdb;" &_
"DriverId=25;FIL=MS Access;" &_
"MaxBufferSize=512;PageTimeout=5;UID=admin;"
adServer.Open
'----- Increment Clicked field value
SQLBanners = "Select * from Banners Where BannerID=" &_
Request.QueryString("BannerID")
Set Banners = Server.CreateObject("ADODB.Recordset")
Banners.CursorType = adOpenStatic
Banners.LockType = adLockOptimistic
Banners.Open SQLBanners, adServer
Banners("Clicked") = Banners("Clicked") + 1
Banners.Update
URL=Banners("URL")
'----- Clean up memory
Banners.Close
adServer.Close
Set Banners=Nothing
Set adServer=Nothing
Response.Redirect(URL)
Response.End
%>
[/code]
In order for all this to work you must have a table in your Access or SQL
database to support it.
The table looks like this:
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
BannerID Number (Long) 4 Index Number
Name Text 50 Name of Ad
URL Text 255 URL to Redirect To
Image Text 255 URL of Image
Hint Text 100 Text of Ad
Type Number (Byte) 1 Type of Ad (1-468 X 60, 2-88 X 31, 3-Text)
Shown Number (Long) 4 Times ad has been shown
Clicked Number (Long) 4 Times ad has been clicked
[/code]
This is the basics of what I developed for my site. It could probably use some
more error checking. It is based on code
originally from www.4guysfromrolla.com.
------------------
Wayne Luke
SitePoint Moderator ICQ 29015947
I appreciate all the help (I really, really do) but I'm looking for something that's a little more a "turn-key" solution. I want to install something and just basically through a bit of code in all my pages and off I run. I don't want to change all the pages (and all my associated internal links) to Active Server Pages if I can avoid it. I don't want to have to do any database maintenance if I can avoid it as this is not an area in which I have any experience. Finally, I'm looking for something which will provide stats to my visitors.
Sorry if I sound picky but I think there should be something out there that can do this. I'm willing to spend a few hundred dollars (maybe even up to a thousand dollars) to get a good solution.
Drop me a line out of the forums and I will create a turn-key solution customized to your needs using ASP and either a text file or Database (Database is better) with a HTML based front-end. You won't have to edit any of your pages and it will work with just 2 lines of code in 4.0 browsers. 3 or 4 in pre4.0 browsers.
------------------
Wayne Luke
SitePoint Moderator ICQ 29015947
Extreme gratitude to everyone but I think maybe I'm looking for a little more than I initially led on. It turns out that this banner ad software needs to support both normal rotating banners and a banner swap program. Also, I want to be able to generate detailed statistics to share with my advertisers. I realize that such a package is going to run me a good amount of money and am willing to pay that but still can't seem to find the right product. Can anybody help?
If cost is not really an option then can I possibly mention Spinbox, I don't use it myself but I know SP uses it. I am supprised no one else has mentioned it.
Bookmarks