Looking at the youtube API library code in Google_IO_Stream and Google_IO_Abstract, you are getting the UNKNOWN_ERROR
code, which is 0
.
You can't know what the error is since the fopen
call is suppressed at the Google_IO_Stream
class (line 102). I suggest you remove the @
sign at the @$fh = fopen($url, 'r', false, $context);
line and run your code again to get the error message.