Created getReferer function.