Daniel Von Fange

Life, Code, and Cool Stuff

Refers Up

Although Reinvented beat me to it, I’ve now installed Refer.

The best part about it? An RSS feed of my refers that is not mentioned on the help page. Now I don’t have to do the classic maniacal refreshing of the refer page - it all comes to me.

Sadly the RSS feed was not up to spec, and choked in NetNewsWire. The RSS .92/2.0 specs state ”the description contains the text (entity-encoded HTML is allowed)”. The refer RSS feed was not escaping the HTML. A quick addition of htmlspecialchars() fixed this.

display.php Line 132:
tag(
 htmlspecialchars(
  tag(tag('Where: ','em').$page,'p').
  tag(tag('From: ','em').$refer,'p').
  tag(tag('Who: ','em').$host,'p')
 ),
'description'),'';

I also created a robots.txt file to keep Google from seeing the refer info. No sense in letting slimy refer spammers get Google Juice.