Home :: Invisible Ad Fiddling

I’ve been fiddling with the ads again, but you shouldn’t see any difference. This extra bit of advertising steps in only when someone has arrived at PigPog from a search engine. It looks at the referrer, and if it finds known search patterns in there, it pops in a little Chitika (affiliate link) unit, passing it the search terms, and alongside that adds some links to look up the same search term here on PigPog, on Wikipedia, Amazon.com and Amazon.co.uk (affiliate links).

Search engine visitors are not usually ‘loyal’ visitors, so showing them an extra ad in an attempt to make vast profits from them seems like a reasonable idea, and hopefully this is doing so in a way that might actually be useful.

Although I wrote the code to do this myself, my PHP skills are pretty limited, and mainly involve grabbing similar chunks from someone else’s code. In this case, I borrowed some chunks of the code behind SEHL, which is normally used to highlight search terms for people referred by search engines. It’s nicely commented code, though, which makes it easier to understand what it does and grab the needed chunks.