Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

kicking a connection from a server PHP

  • 17-11-2005 05:32PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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