Php question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pipecrew
    Master of Gfy.com
    • Feb 2002
    • 14888

    #1

    Php question

    I got a bunch of people's ips that I would like to redirect (just annoying people that come to my site and post stuff)

    is there any script that will read from a banned list of Ip's and redirect them to wherever, something simple so I could just put ti in the <head> tags or wherever ?

    any help would be great

    thanks
  • Lane
    Will code for food...
    • Apr 2001
    • 8496

    #2
    hmm, didnt test this but worth to try

    if (in_array("$REMOTE_ADDR\n",file("banned.txt"))) header("Location: http://www.wherever.com");


    banned.txt should have an ip per line..

    Comment

    • ServerGenius
      Confirmed User
      • Feb 2002
      • 9377

      #3
      that DOES work

      DynaMite
      | http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

      Comment

      • Pipecrew
        Master of Gfy.com
        • Feb 2002
        • 14888

        #4
        excellent, really appreciate that lane

        Comment

        Working...