Нужен скрипт, писать все ip в файл

Discussion in 'PHP' started by yoweb, 26 Mar 2015.

  1. yoweb

    yoweb Banned

    Joined:
    17 Jun 2013
    Messages:
    120
    Likes Received:
    2
    Reputations:
    0
    Нужен скрипт, писать все ip, зашедшие на сайт в файл.
     
  2. yoweb

    yoweb Banned

    Joined:
    17 Jun 2013
    Messages:
    120
    Likes Received:
    2
    Reputations:
    0
  3. totenkopf

    totenkopf Elder - Старейшина

    Joined:
    19 Jul 2010
    Messages:
    92
    Likes Received:
    64
    Reputations:
    19
    PHP:
    <?php
    file_put_contents
    ('log.txt',$_SERVER['REMOTE_ADDR'],FILE_APPEND);
    ?>
     
    1 person likes this.
  4. VKtraf

    VKtraf Member

    Joined:
    3 Feb 2012
    Messages:
    55
    Likes Received:
    10
    Reputations:
    5
    :)
    PHP:
    <?php
    if (!file_get_contents("log.txt")) {
    file_put_contents("log.txt""");
    }
    file_put_contents('log.txt'$_SERVER['REMOTE_ADDR']."\r\n"FILE_APPEND);
    ?>
     
    #4 VKtraf, 26 Mar 2015
    Last edited: 26 Mar 2015
  5. yoweb

    yoweb Banned

    Joined:
    17 Jun 2013
    Messages:
    120
    Likes Received:
    2
    Reputations:
    0