Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

kicking a connection from a server PHP

Options
  • 17-11-2005 5:32pm
    #1
    Registered Users Posts: 648 ✭✭✭


    hi

    anyone know the php code for kicking(disconnecting) a connection (if we have the users ip address) from a server?

    Thanks


Comments

  • Registered Users Posts: 1,268 ✭✭✭hostyle


    [php]
    <?php

    $domain = GetHostByName($REMOTE_ADDR);

    if (in_array($domain, $banned_list) {
    header("HTTP/1.0 403 Forbidden");
    exit;
    } else {
    // continue as normal
    }

    ?>
    [/php]


  • Registered Users Posts: 648 ✭✭✭ChicoMendez


    Tnx but thats not quite what im looking for

    see i have a script that give me a list of all connections to a server. If there are 2 connections from one ip address i want to cut his connection. i dont necessarily want to ban him.

    Any ideas?


  • Registered Users Posts: 1,268 ✭✭✭hostyle


    Tnx but thats not quite what im looking for

    see i have a script that give me a list of all connections to a server. If there are 2 connections from one ip address i want to cut his connection. i dont necessarily want to ban him.

    Any ideas?

    How is a "connection" initiated? What defines two "connections"? One machine making two connections to port 80? Two seperate browser windows? Two logins from seperate IP addresses? Something else? You're being way too vague.


  • Registered Users Posts: 648 ✭✭✭ChicoMendez


    hostyle wrote:
    How is a "connection" initiated? What defines two "connections"? One machine making two connections to port 80? Two seperate browser windows? Two logins from seperate IP addresses? Something else? You're being way too vague.

    Two connections to a certain port (lets say 80) from one ip address.
    Im looking for the php code to break the connection with that ip.

    Tnx


Advertisement