WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Feed ads by region (3 posts)

  1. coopersita
    Member
    Posted 3 years ago #

    Hi,

    Is there a plugin for rotating ads that can feed an ad based on the visitor's region?

    For example, if a visitor is from the UK, they'd get the Amazon UK ad, while a person from the US gets the Amazon US ads?

    But not only for Amazon, other affiliate networks as well?

    Thanks

  2. Sidney Harrell
    Member
    Posted 3 years ago #

    Shouldn't be to hard. Couldn't find a wordpress function to get a visitor's IP address, but there is a straight PHP predefined variable that should help.
    $_SERVER['REMOTE_ADDR'];
    You would have to check it against a list of what IP blocks are assigned to different countries.
    I got the idea from this rather defunct looking plug-in:
    http://wordpress.org/extend/plugins/show-visitor-ip-address/
    You might be able to start there and modify it to suit your needs.

  3. coopersita
    Member
    Posted 3 years ago #

    Thanks. We decided to just to US, at least for now, but will keep in mind.

Topic Closed

This topic has been closed to new replies.

About this Topic