diff options
author | Naglfar <naglfar@tilde.institute> | 2021-01-08 23:07:56 +0100 |
---|---|---|
committer | Naglfar <naglfar@tilde.institute> | 2021-01-08 23:07:56 +0100 |
commit | b3999a235201891805ad9477d5e31cfcd88fe180 (patch) | |
tree | 3526ae7a373a42fdb331219c92c27ce173adcad1 /php/rd-procedures.php | |
parent | 954e914a4f100348c4cd7fdaef7d2ae7a10d4392 (diff) | |
download | MightyWVMS-b3999a235201891805ad9477d5e31cfcd88fe180.tar.gz |
Add video views counter
Diffstat (limited to 'php/rd-procedures.php')
-rw-r--r-- | php/rd-procedures.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/php/rd-procedures.php b/php/rd-procedures.php new file mode 100644 index 0000000..27fd11e --- /dev/null +++ b/php/rd-procedures.php @@ -0,0 +1,15 @@ +<?php +$vindex = file($dpath.$mdata[3].'/'.$toc, FILE_IGNORE_NEW_LINES); + +/* 1 parse the URL */ +$vdata = explode('/', $_SERVER['REQUEST_URI']); + +/* 2 security check */ +if(!empty($vdata[1])) + foreach($vindex as $i => $value) + if($vdata[1] == $value) + $vid = $i; + +$vdata = file($dpath.$mdata[3].'/'.$vid, FILE_IGNORE_NEW_LINES); +$cindex = file($dpath.$mdata[3].'/'.$channel, FILE_IGNORE_NEW_LINES); +?> |