Need custom cgi script

We are in the need of a script that will allow our clients to place our banner on their site and receive a commision for every sale that is refered from there site. We have seen this program in operation on numerous sites but have been unable to find a turnkey package. Where can I find this program? Will I need to have someone write it for us? Any information would be greatly appreciated. Thank You in advance.

Lee Lovvorn
LAL Communications
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is not as simple as it seems, even though
the technical implementation is about 5 minutes work if you
want to keep things simple.

The problem is that not every access to your site will result
in a sale. This means every time a user comes to your site
from a client site, you have to log this information.
This info then has to be cross-referenced with your sales

The banner (some image I assume) will contain a link to
a CGI program on your site. This program will run when
the user clicks the banner, and does the following:
1. Log the 'clientid' (probably IP address) and refererer site
(client site).
2. Foward one of your HTML pages to the (potential) customer.

Whenever a sale is made, you have to store the IP address
of the client in order to trace from which site the user came.

If you want to do the sales/log check manually, then any
competent C/C++/Perl/Java/whatever programmer can write
this program in say 10 minutes.

If you want the information to be stored in a decent database
and then perform the checks automatically, well, depending
on the platform/software this can involve a week of development.

Some intermediate solution is possible, but it all depends
on the logging of your sales.
This is why you won't find a turn-key package. There are
some programs available, but they also require you to use
_their_ shopping card/sales system.

If you can give any info on how sales records are maintained,
I might be able to give some more pointers.

One more option - if you have your own webserver, you don't need a CGI program. Simply extract the appropriate info from
the server log files, i.e. collect the IP adress of user & Refererer site info for all requests to the page the banner
points to.
Or talk to the webmaster of your site.

A very simple solution might be:

Make the "A HREF=" tag's (the one at your client's site) URL point to a cgi script at your site. This cgi script would save the HTTP "referer" parameter in a cookie that is stored on the user's computer or a state variable passed as a hidden field in your forms. When a sale is made, just refer to this value to credit the correct client.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

the problem with both solutions is this:

say i am lovvorn; i have set up the appropriate CGI, store the infos correctly, at the end of the month i know that Client_A braught me 100 users who made an order;
now i pick up the phone and call Client_A and tell him: "hello, nice month isn't it, you braught me 75 users who made an order, so i owe you 750$"!!

So the real problem here seems to be how to set up a method that works for the Client as well.

The only way that comes to mind (well, to my mind:) is that the log happens on the Client side, 'cause you will anyway get an order.
This involves mirroring some pages (at least the order page) to the Client's web server machine.
When a user submits an order, that order is first logged into the Client's log file, then is sent to you for processing.

This may be or may not be possible, depending on how complex is the ordering part of your site.

Anyway, my two cents...

Cheers, julio
Julio, don't automatically assume companies lie, cheat or steal
from their clients.
Your point is valid, but falls into the category of
unsolvable problems - there is no way for the client to check
whether a site visit results in an order, unless a third trusted
party sets up a tightly secured logging system tied in to
the sales system. Very cumbersome, very expensive.
So why bother with it?
Remember, it is in the company's interest to pay their clients
for including their banner. If the clients never see any money,
they won't bother to include the advertisement/link any more.

This is a case of symbiosis, not parasitism.
(mmm, paraSite-ism, nice pun).

Well, i really didn't mean to assume anything.
Just wanted to show what the Client point of view could be - or, should be!

So why bother with it? Because the two parts are to stipulate a contract: what would you write in it? "You may trust me"?!

Of course, everything with a grain of salt, but note that Mr. lovvorn signed as 'LAL Communications', which leads to some presumptions.

Rgds, julio
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.