how to get contents of a file using read() code example
Example 1: turn text file to string php
$fileContent = file_get_contents($url);
Example 2: transfer file using file_get_content
file_get_contents('http://url/to/upload/handler', false, $context);