I want to use fwrite to post $username in base64 encoded Here is my current source
$fp = fopen(\"id.txt\", \"a\"); fwrite($fp, \" $username\\r\\n\"); fclose($fp
Did you try a Google search or reading the PHP documentation?
http://php.net/manual/en/function.base64-encode.php