Give help. Get help.

  • # September 22, 2010 at 1:09 pm

    Hi everyone! I’m currently interested in displaying a quick line or two of copy if a visiter’s IP address falls between a certain range. Do any of you have any resources or ideas of how I can go about it?

    I’d like to use JS for this. I’d imagine I can use JS to detect the IP then use an IF statement to display said content. I’m pretty new to JS and is the reason why I would love some help from ya’ll :)

    Any help is MUCH appreciated. Thnx!

    # September 22, 2010 at 4:47 pm

    yeah… all right ok … it can be possible but there is more than just js for this to work if u want to display content depending on country…etc… but if you know the IP address of the person then is much easier here is a php Snippet to get the job done…

    < ?php
    this Snippet allows you to display content "ONLY" to a visitor from
    a specific IP addresses in a page.
    Change the $allowed "value" to the IP address you want.
    $allowed = '';
    $userip = $_SERVER;
    if($userip == $allowed){
    echo "This content is only viewed by the IP address you chose...";
    # September 22, 2010 at 6:51 pm

    Thanks man, not exactly what I was looking for, but it’s good to know the php side of things.

    I’m really trying to do this with JS. I’m also trying to do a range of IP addresses.

    Thanks for your input!

    # September 24, 2010 at 4:30 pm

    # August 1, 2012 at 1:46 am

    You can find the IP address and the location details using
    It gives your current ip address and location details with the location
    map with latitude, longitude coordinates.

    # May 16, 2013 at 6:38 am

    use the javascript service provided by

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.