[WIP] PHP port

Attached is a PHP port for the referrer parser. Comments more than welcome :)