Create TXT file in terminal PHP

Discussion in 'PHP' started by piropeator, Jan 22, 2011.

  1. #1
    I have my aplication in intranet (server) and 5 users (terminals).
    I want to create a txt file in every terminal as needed.
    How I do that ?
     
    piropeator, Jan 22, 2011 IP
  2. G3n3s!s

    G3n3s!s Active Member

    Messages:
    325
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #2
    I am not getting you, you probably want to place txt file for each user

    <?php
    $f = fopen($_SERVER['REMOTE_ADDR'].".txt", "w+");
    fclose($f);
    PHP:
    this code makes txt file with user IP everytime he access site, but don't worry, it just replaces that file
     
    G3n3s!s, Jan 22, 2011 IP
  3. piropeator

    piropeator Well-Known Member

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #3
    Oh, ok. I didn't know that. And if every user want to print this txt file in his terminal printer ? How I do that ?
    thanks.
     
    piropeator, Jan 23, 2011 IP
  4. G3n3s!s

    G3n3s!s Active Member

    Messages:
    325
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    80
    #4
    there are no php functions tu just print file, user has to do it manually.
     
    G3n3s!s, Jan 23, 2011 IP