Who ever told you that http:// does not support write is correct. It is a read only method when you call the http://
To write to a file that you have permissions to, you can do skip the http://host.tld and just put in the path or file name of the file.
<?php
$file = fopen("/usernames/".$user.".txt","a+");
$passwordcheck = fread ($file,8);
fclose ($file);
$file = fopen("/usernames/".$user.".txt","r+");
fwrite ($file,"workin!");
fclose ($file);
?>