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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

kicking a connection from a server PHP

  • 17-11-2005 4: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