magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 06 > Programming with Perl  

Tracking New Arrivals

Today, much of the Web's content is found not by users clicking on interesting URLs posted on other sites, but by users typing search queries in to the big indexing engines like AltaVista, Lycos, and Infoseek. If you're maintaining a referer log (spelled this way for historical reasons), you may have noticed that the query strings typed in by the user sometimes show up when that user follows a search-results link to your page. This happens because the indexer's search page is often a GET form, and the parameters of the search are therefore encoded into the URL of the search-results page.

With this in mind, I decided to write a program that would go through my referer log and extract just the search strings. This is more than idle curiosity; it tells me exactly what people were looking for that brought them to my page, and what I should be providing more of if I want my site to be popular -- especially if I sell ads or want to be famous.

The referer log (available for most popular Web servers) is merely a record of the HTTP Referer header, which will frequently point to the URL from which the URL request is being made. The referer is not necessarily supported on all browsers, and will be messed up on a bookmarked entry. But for the majority of hits, the referer can give valuable information (as you can see by looking at the results of this program on your site).

Extracting Strings

The program to extract the search strings from the referer log is presented in



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2