I manage a small site and here and there we manage to sell some banners.
Recently we started working with an advertising company who (of course)
requires us to pull banners from their server. The problem is: although we
sell a certain number of impressions their server load balances the
impressions and if too much banners are being showed he sends back our own
banner. Problem? I can never tell how many real banners I showed and how
many of my own banners. Yes there's a stats page at the advertisers server
but..... I have my own stats app which has become useless....
So.... the process of showing a banner goes something like this:
-user requests page
-page runs db query and gets a banner
-echo <a><img src="banners/asdasd.jpg"/></a>
or ...
echo <a><src="www.adverserver.com/mysite/id=324234" img/>
What do I want? :-)
I want to know exactly how many my banners and "real" banners are showed.
Therefore I came up with the following encapsulation idea :-)
I fopen the www.adverserver.com/mysite/id=324234 check the size, if it's ==
with my banner I do a mybanner++ query else their_banner++ query. Show the
image and everybody is happy :-)
There are of course some technical problems related to my idea because I
have to echo a raw image on a page that already sent headers but I'll think
of something :-))
Is there any better/faster/smarter way to deal with my problem?
cheers,
gordan
PS
in case anybody from Croatia/Slovenia is familiar with the situation the
advert company is Httpool :-)