First off i'd wonder why you'd want to do such a thing. Secondly, the header is set by the user agent (usually considered the browser). Which means that if you want to alter the referrer, you'll have to have your site acting as a proxy, as php would then be the user agent. However, that may or may not work with what you're trying to do.
Note: The referrer header can also be altered by something in the way of the network chain, like a firewall, however that isn't useful in this case but thought i'd mention it.
Note: If this is just for personal use you can simply look at some of the browser addons out there and do it on a browser by browser basis.