From the manual:
Use fopen(string filename, string mode), which returns a resource handle, to open the remote file (assuming that such a feature is enabled within your PHP).string fread ( resource handle, int length )
fread() reads up to length bytes from the file pointer referenced by handle. Reading stops when up to length bytes have been read, EOF (end of file) is reached, or (for network streams) when a packet becomes available, whichever comes first.
PHP Code:$fp = fopen('http://remote/file.mp3', 'r');
$data = fread($fp, 100 * 1024);




Reply With Quote