Check referer and give a message
I have been trying to find how to get the refering url to a page of my website, check if it's included on a txt file and then print a modal popup with a message. So, if you come from a friend url included on the txt it will welcomes you "You come from a friend's url" for example, and if not, then another msg will be printed.
Someone knows? I have found codes for the different functions separately but don't know how to put them all together to do this.