samedi 21 mars 2020

When someone comes from a refferal site, an html code appears, otherwise not (PHP or Javascript) [closed]

I have researched a lot but can't find the answer to this or a way to do this. What I exactly want, is that when someone enters my website from another referral website, an HTML code appears but if that person enters the website direct or trough google search, no HTML code appears.

Example: When I search "example" and click on the website: "example.com" the website is normal But when I go to "1example1.com" and from there I get redirected or I click somewhere that I get to "example.com", an HTML code like an H2 appears.

I will need something like: if enters from refferal: html code appears, if else: nothing appears. I am not really good with PHP, so it would be nice if something knows the solution.

I found this kind of posts: Referral URL in php but that didn't help me really. I also searched in other websites but I only find articles about "getting referral information in PHP" and not the solution for this.

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire