1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I disable a script based on IP address??

Discussion in 'PHP & Perl' started by theconfidenceman, Mar 18, 2010.

  1. theconfidenceman

    theconfidenceman Regular Member

    Joined:
    Feb 24, 2008
    Messages:
    262
    Likes Received:
    57
    Location:
    New York
    Home Page:
    Hey guys,

    Thanks in advance for your help.
    Im currently running v1rtual sm4rt ag3nt script on my site which is a virtual chat. I want to disable the pop up when I hit the site in from a particular IP address.

    what line of code would I put on the page to effect this??
     
    Last edited: Mar 18, 2010
  2. theconfidenceman

    theconfidenceman Regular Member

    Joined:
    Feb 24, 2008
    Messages:
    262
    Likes Received:
    57
    Location:
    New York
    Home Page:
    is this not possible?
     
  3. yeahright

    yeahright Registered Member

    Joined:
    Jan 17, 2009
    Messages:
    93
    Likes Received:
    32
    I'm not totally familiar with vsa, but you'll nee to make an if statement in php where the javascript code is.

    So something like:
    PHP:
    if($_SERVER['REMOTE_ADDR'] != '123.456.789') {
    echo 
    '<script>...vsa code, probable onunload or somethind';
    }
     
    • Thanks Thanks x 1
  4. GetThatMoney

    GetThatMoney Registered Member

    Joined:
    Aug 20, 2007
    Messages:
    55
    Likes Received:
    7
    This. I assume you're talking about an exit-pop-type script? If you're talking about some sort of LivePerson kind of script and you just want to disable a popup and not the whole script you'll want to place that php in the javascript and have it echo w/e code creates the popup.