diff options
author | Jesús <heckyel@hyperbola.info> | 2019-05-24 21:21:55 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-05-24 21:21:55 -0500 |
commit | 380cfc1f7d2c461e6b6f33eba2c5ea9f22b735bc (patch) | |
tree | 9fb1237376315065ba5f16a75b1b456d0506b6e6 /tools/init.php | |
parent | 69e55dbd94be1d0a20ffea50294c7495bb0101ee (diff) | |
download | ytlibre-380cfc1f7d2c461e6b6f33eba2c5ea9f22b735bc.tar.lz ytlibre-380cfc1f7d2c461e6b6f33eba2c5ea9f22b735bc.tar.xz ytlibre-380cfc1f7d2c461e6b6f33eba2c5ea9f22b735bc.zip |
update check DRM into videos
Diffstat (limited to 'tools/init.php')
-rw-r--r-- | tools/init.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/init.php b/tools/init.php index f3c39ce..c23d5c9 100644 --- a/tools/init.php +++ b/tools/init.php @@ -49,3 +49,13 @@ function bytes($a) { } return number_format($a,($c ? 2 : 0),",",".")." ".$unim[$c]; } + +// Check, if there is not content into URL return 'false' +function breakdrm($url) { + @$headers = get_headers($url); + if (preg_match('/^HTTP\/\d\.\d\s+(403)/', $headers[0])){ + return false; + } else { + return true; + } +} |