Hello, please which php functions are used to upload file from computer or from URL?

There is:

fopen (https://secure.php.net/manual/en/function.fopen.php)
allow_url_fopen (https://secure.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen)
file_get_contents (https://secure.php.net/manual/en/function.file-get-contents.php)

but im unsure if these are necessary and if there are any others? My aim there is to find functions absolutelly essential in order to:

- add an content into .php file
- upload file from computer
- upload file from an internet url