Hide the Referer by redirecting through an intermediate page. This type of redirection is often used to prevent potentially-malicious links from gaining information using the Referer, for example a session ID in the query string. Many large community websites use link redirection on external links to lessen the chance of an exploit that could be used to steal account information, as well as make it clear when a user is leaving a service, to lessen the chance of effective phishing.

You can't modify the referer header unless you control the calling client, e.g. the browser.

Browsers block modifying the referer, and server-side code can't inject headers into a request as there is no way to get the header from the server to the client, and make the client inject it into the referer header of it's next request.

That's assuming the browser doesn't have a particular vulnerability around header injection from JavaScript though.

I would write a python script (see http://docs.python-requests.org/en/latest/ for a great library, if the standard urllib looks complicated) but I think you would be able to spoof the referer using Tamper data / live http header plugin for firefox. Not sure tho, but have a look.
There is also other firefox addons the lets you manipulate the referer header. Just search for referer in the firefox addons.