The HTTP Referer is set by the HTTP client, usually the web browser, when it accesses a site. If you want to access a site from PHP, you can use
CURL. CURL has an option which allows you to set the HTTP Referer:
curl_setopt($ch, CURLOPT_REFERER, "yourreferurl")
I'm not sure if that is what you are asking, because you have been very vague in your question.