<?php
$headers = @get_headers('http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=vPlT2uKruwM');
if (!strpos($headers[0], '200')) {
echo "The YouTube video you entered does not exist";
return false;
}
Warning: Trying to access array offset on false in /in/Gk6ln on line 5
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/Gk6ln on line 5
The YouTube video you entered does not exist
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: Trying to access array offset on false in /in/Gk6ln on line 5
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/Gk6ln on line 5
The YouTube video you entered does not exist
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: Trying to access array offset on value of type bool in /in/Gk6ln on line 5
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/Gk6ln on line 5
The YouTube video you entered does not exist
Output for 8.0.0 - 8.0.30
Warning: Trying to access array offset on value of type bool in /in/Gk6ln on line 5
The YouTube video you entered does not exist
Output for 7.4.0 - 7.4.33
Notice: Trying to access array offset on value of type bool in /in/Gk6ln on line 5
The YouTube video you entered does not exist