I am trying to write a very basic registration module for blueimp.net's AjaxChat. I have a script that writes to the user config file.
$userfile = "lib/data/users.php";
$fh = fopen($userfile, 'a');
$addUser = "string_for_new_user";
fwrite($fh, $addUser);
fclose($fh);
But I need it to insert $addUser
before the very last line, which is ?>
How would I accomplish this using fseek?