Currently: The current encryption result is that 0-9 items are randomly encrypted and the rest are all encrypted
The desired result is: 0-9 items are randomly encrypted and the rest are not encrypted
$fileNameArr = scandir($dir2);
foreach ($fileNameArr as $fileName) {
if ($fileName != '.' && $fileName != ' ..') {
$m3u8txt = file_get_contents($dir2.'/'.$fileName);
$m3u8txt = str_replace("\r","",$m3u8txt); # preg_match_all('/#EXTINF:(.*),\n?(.*)\n?/',$m3u8txt,$m3u8Arr);
$timeArr = $m3u8Arr[1];
using using using - ’ ’ s ’ s ’ s ’ s ‐ ‐ ‐ ‐ ‐ ‐ ‐ ‐
Key = & gt; $ ts) { $ TS = TRIM ($ ts); IF ($ jmtype == 1 || ($ jmtype == 2 && strstr ((string)) $key,$r) == true)) { $jmts = publicEncrypt($ts); " . '#EXTINF:' . $timeArr[$key] . ','; ts = '. $ jmts;## $ m3u8 = $ m3u8. "\ n". $ jmurl;
##} Else {## $ m3u8 = $ m3u8. "\" \ n" . $ts;
echo $fileName . '-' . $ts . 'Encryption failed'; }