From 6d735abe0a59204477346d7fa873a384eb55afee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 11 Dec 2020 23:37:14 -0500 Subject: Renew sig file after 60 sec --- tools/extract.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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'); -- cgit v1.2.3