aboutsummaryrefslogtreecommitdiffstats
path: root/tools/init.php
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-05-24 21:21:55 -0500
committerJesús <heckyel@hyperbola.info>2019-05-24 21:21:55 -0500
commit380cfc1f7d2c461e6b6f33eba2c5ea9f22b735bc (patch)
tree9fb1237376315065ba5f16a75b1b456d0506b6e6 /tools/init.php
parent69e55dbd94be1d0a20ffea50294c7495bb0101ee (diff)
downloadytlibre-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.php10
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;
+ }
+}