• donaldfoley

    (@donaldfoley)


    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 (https://www.donaldcfoley.com/blog/) but a different one (https://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: https://www.donaldcfoley.com
    Blog: https://www.donaldcfoley.com/blog/
    IMDB: https://www.imdb.com/name/nm1975841/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter donaldfoley

    (@donaldfoley)

    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=https://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?

    Thread Starter donaldfoley

    (@donaldfoley)

    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=https://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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing blog based on referral url’ is closed to new replies.