resource fopen ( string $filename, string $mode [, bool $use_include_path = false [, resource $context ]] )
fopen function’s role is to open a file or URL and then return a file pointer resource when its successful. If an error occurs, such as the file or URL does not exist or the permissions are not set for the mode, it returns a
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
More coming soon…keep checking back.