You can not.
The referent is set by the browser (i.e. the client side). PHP runs on the server side and cannot modify information on the client side.
Another option is to change it using javascript, but browsers will not let you change it . If you absolutely must click www.newwebsite.com using the abstract from mysite2.com , you can use cURL or similar libraries that allow you to set your own HTTP headers. It is assumed that you do not have control over mysite2.com . If you have control over it, you can redirect to mysite2.com from mysite.com , and then redirect to www.newwebsite.com from mysite2.com .
source share