I am trying to figure out if someone is coming from a designated website that I have made using $_SERVER['HTTP_REFERER'], and when I echo the website that it is coming from I can get the page URL that it is from. Now I need to know how to use IF/ELSE statements to allow me to send the users to the website they are trying to access or to send them to another if they are not using the starting site.
For Example but not the actual code:
if(siteAddress==example.com){
//continue to site
}
else{
//send to a different site
}
I am trying to use this code to allow me to make a puzzle for my friends, where if they are coming from the puzzle before then they will continue, but if they try to skip ahead it will send them to a "Cheater" URL that I have made.
Can you guys help me?
Aucun commentaire:
Enregistrer un commentaire