DonaldFoley
Member
Posted 6 years ago #
Hi,
Does any one know how I could change my blog menu content when the site was visited from a certain url. This is an example of what I want. I hand out biz cards with not my usual blog url (http://www.donaldcfoley.com/blog/) but a different one (http://www.donaldcfoley.com/card/) and when the person links to it, it automatically jumps to the blog url. Then in the blog I look to see if the referral url is from the card, and I can change some content that I want highlighted to people who came to the site from my card. Is there a way to do this easily. How can you check the referral site, I know my hosts seems to be grabbing that info. And how do I modify content based on that. Any help would be greatly appreciated. Also, I tried searching to see if this was already discussed and found no info.
Thanks and Kind Regards,
Donald C. Foley
Home: http://www.donaldcfoley.com
Blog: http://www.donaldcfoley.com/blog/
IMDB: http://www.imdb.com/name/nm1975841/
DonaldFoley
Member
Posted 6 years ago #
I did learn how to view the referral if it came through a click: $_SERVER['HTTP_REFERER']
Unfortunatly I want to see if it came from my redirect page which has the following meta tag:
<META HTTP-EQUIV="refresh" content="0;URL=http://www.donaldcfoley.com/wordpress">
Is there a way in PHP to see the referfal url of the site that just auto refreshed to the blog site?
DonaldFoley
Member
Posted 6 years ago #
Ok, I think I figured out a way to do this. By adding post data to the url. I believe I can use $_GET() to find if the wordpress blog was referred from a specific site I set up.
<META HTTP-EQUIV="refresh" content="0;URL=http://www.donaldcfoley.com/wordpress?camefrom=card>
<?php if ($_GET["camefrom"] = "card") then show special case content ?>
I have not had time to try it, I will give updates soon. I hope this is helpful. If you have done something like this or have any comments please let me know.
Don