aboutsummaryrefslogtreecommitdiffstats
path: root/tools/extract.php
diff options
context:
space:
mode:
Diffstat (limited to 'tools/extract.php')
-rw-r--r--tools/extract.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/extract.php b/tools/extract.php
index 97cad90..4d52852 100644
--- a/tools/extract.php
+++ b/tools/extract.php
@@ -2,6 +2,14 @@
$id = $video_id;
+// Delete sig file if is old 60 sec
+if (is_file(TOOLS_PATH.'sig.php')) {
+ $filelastmodified = filemtime(TOOLS_PATH.'sig.php');
+ if((time() - $filelastmodified) > 60) {
+ unlink(TOOLS_PATH.'sig.php');
+ }
+}
+
function getc($url) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');