PHP | Online Notepad

Posted by user2947423 on Stack Overflow See other posts from Stack Overflow or by user2947423
Published on 2013-11-02T09:45:38Z Indexed on 2013/11/02 9:53 UTC
Read the original article Hit count: 124

Filed under:
|

I recently made a Chat application in Visual Basic using PHP.

I used this code:

<?php
$msg = $_GET['w'];
$logfile= 'Chats.php';
$fp = fopen($logfile, "a");
fwrite($fp, $msg);
fclose($fp);
?>     

I'm now trying to make a Online Notepad. What i want to do is in Visual Basic create a unique ID. That unique ID, has to be his filename. I'm not very good with PHP so what i want to know is:

I want the unique ID to be the filename of the "Note". Like: $logfile= '{uniqueID.php}';

Whenever the user opens the program, it'll open his uniqueID.php file and he can edit that in my program.

Long Story Short (TL;DR)

  • Program generates uniqueID
  • uniqueID is going to be a new file; {uniqueID}.php
  • On next open it will check if {uniqueID}.php of him/her exists else it will make a new one.

I know this isn't really secure but it's to learn something for myself.

© Stack Overflow or respective owner

Related posts about php

Related posts about vb.net