That's strange, I had zero success getting any variation of fseek to work with remote files... take the following example for instance:
Code: Select all
$fh = fopen("http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4", "rb");
fseek($fh, 5242880, SEEK_SET);
$data = fread($fh, 5242880);
PHP will throw the following error: Warning: fseek(): stream does not support seeking in C:\wamp\www\metadata.php on line 27
The PHP manual used to say that fseek would not work over HTTP or FTP, I can't find reference to that anymore.
I did however, a few hours ago, manage to get just the end of the file by using the cURL with "CURLOPT_RANGE" option that you mentioned, but from what I understand this will only work if the server is willing to obey the "Content-Range" header, which in my case it does because Amazon S3 is configured that way. Thank you so very much for all your help, with all do honesty, you are incredibly knowledgeable and helpful.