<?php
$file = 'tx.txt';
$newFile = 't.txt';

// 读取原文件内容
$content = file_get_contents($file);

// 正则匹配href的值
preg_match_all('/href=[\'"](.+?)[\'"]/i', $content, $matches);

// 遍历匹配结果,构建新的路径并写入新文件
$newContent = '';
foreach ($matches[1] as $match) {
    $newContent .= 'http://av.host.gay/mp4/' . $match . "\n";
}
file_put_contents($newFile, $newContent);

echo '提取完成';
用php提取本地txtxt文件里全部的href的值路径地址并写成httpavhostgaymp4值放到新的ttxt文件里

原文地址: https://www.cveoy.top/t/topic/eA70 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录