I have made up a similar simple php script : http://frenchfragfactory.net/ozh/archives/2005/02/05/no-refer-spam/
It saves about 50 to 100 pages a day (i’m logging all the redirection) and since it’s activated, my refer log is crap free …