WEB secure browser based .txt file editor

Discussion in 'OT Technology' started by conRAD, Oct 24, 2007.

  1. conRAD

    conRAD New Member

    Joined:
    Feb 12, 2007
    Messages:
    501
    Likes Received:
    0
    Location:
    NY
    hi there.

    I'm working on something for a flash based website. I don't really need to get into specifics on why - but summed up...

    I have a text field in flash, that reads a .txt file sitting on the server. I want a way for others, who are given a user/pass, to edit this .txt file through their browsers.

    For now, it would just need to overwrite, or add to the existing text file. The text file includes a line that I would not like them to be able to see (a piece of code my action script reads, that if they removed would break the script).

    I have no idea how to do this, but it seems simple enough, if only one text file and one user/pass is involved.

    What I really eventually need though, is the ability to assign multiple people login/passwords, that only point to one specific text file for each person. i.e. - User A can edit UserA.txt, but not UserB.txt. User B can only edit UserB.txt, and not UserA.txt, etc.

    Googled around a bit for a simple solution here, but everything I found seemed to include way too much, more than I need.

    If anyone has some tips, or links, it would be most appreciated.

    Thanks,
    conRAD
     
  2. VD

    VD Active Member

    Joined:
    Aug 18, 2004
    Messages:
    71,510
    Likes Received:
    0
    Location:
    TWIN CITIES
    easiest way would probably be a php file with a form on it that writes to that text file.

    You could put some pretty crude password protection on it and be fine. :dunno:
     
  3. MrBrotato

    MrBrotato New Member

    Joined:
    Sep 7, 2005
    Messages:
    5,558
    Likes Received:
    0
    I agree, you need a PHP script that just reads a text file and displays it in a textarea and when you hit submit writes the text area over the file. This would be in a folder on its own like /admin or something that you could .htaccess password protect. Very easy to do with CPanel and have multiple usernames and passwords.

    As for hiding the actionscript line. Could that be in a seperate file? Just have your flash app look at both text files instead of one text file?
     
  4. conRAD

    conRAD New Member

    Joined:
    Feb 12, 2007
    Messages:
    501
    Likes Received:
    0
    Location:
    NY
    thanks for the tips guys. gonna bang it out later on and post results :)
     
  5. conRAD

    conRAD New Member

    Joined:
    Feb 12, 2007
    Messages:
    501
    Likes Received:
    0
    Location:
    NY
    got it working. I've got the file with the form that my users are using to update the pages as a secure directory w/ htaccess. PHP Takes the input and updates the txt file. Was much easier than I expected.

    Thanks again :)
     
  6. conRAD

    conRAD New Member

    Joined:
    Feb 12, 2007
    Messages:
    501
    Likes Received:
    0
    Location:
    NY
    www.gigglewarriors.com

    the "bonus" section has the script in place while im showing it to my guys who are going to be using it. Each member is going to have their own page where they can have a small blog, photo they can upload, and other info.

    page is NWS in some areas, its for a counter-strike team. History section is epic :)
     
  7. MrBrotato

    MrBrotato New Member

    Joined:
    Sep 7, 2005
    Messages:
    5,558
    Likes Received:
    0
    Nice history page :).
     

Share This Page