首页
文章导航
导航
壁纸
更多
留言板
直播
友链
统计
关于
推荐
wszx博客
Search
1
MoonTV 完整部署教程|免费搭建影视聚合平台!支持 Cloudflare Pages + 自动更新 + 多资源接口
23 阅读
2
免费二级域名,包括可托管到cf的二级域名
13 阅读
3
serv00注册等系列教程,服务器清理,ssh连接不上问题轻松解决,非挂代理
13 阅读
4
使用油猴插件进行关键词屏蔽
10 阅读
5
Serv00/HostUNO 域名邮箱教程 | 设置全域邮箱(Catch-All) | 提高发件可信度
9 阅读
默认
日常
学习
技术
登录
Search
标签搜索
cloudflare
白嫖
安装
脚本
CF
壁纸
图片
docker
Linux
Caddy
代码
哪吒
节点
域名
桌面壁纸
手机壁纸
NAT
LXC
邮箱
优选
ws01
累计撰写
117
篇文章
累计收到
44
条评论
首页
栏目
默认
日常
学习
技术
页面
文章导航
导航
壁纸
留言板
直播
友链
统计
关于
推荐
wszx博客
搜索到
1
篇与
的结果
2025-04-15
自动收集网上的聚合节点订阅
自动收集网上的聚合节点订阅 新建一个txt文档,复制以下代码进去,修改文件名为:index.phpToken验证 iloveyou 可以修改为你自己的打开网页:https://域名/test.php?token=iloveyou<?php // Token验证https://域名/test.php?token=iloveyou if (!isset($_GET['token']) || $_GET['token'] !== 'iloveyou') {//因为作者是超绝恋爱脑 header("Content-Type: text/plain"); echo "你的TOKEN不对!"; exit; } set_time_limit(0); // 禁用脚本执行时间限制 // 缓存配置 $cache_file = __DIR__ . '/cache.txt'; $cache_time = 14400; // 4小时缓存 // 返回缓存内容(如果有效) if (file_exists($cache_file) && (time() - filemtime($cache_file) < $cache_time)) { header("Content-Type: text/plain"); echo file_get_contents($cache_file); exit; } // 完整URL列表 $urls = [ "https://raw.githubusercontent.com/aiboboxx/v2rayfree/main/v2", "https://raw.githubusercontent.com/shirkerboy/scp/main/sub", "https://jiang.netlify.app/", "https://fforever.github.io/v2rayfree/", "https://xlz767v2ray.pages.dev/sub/b9b8cf4c-29a3-4288-9c6c-8811dc37beec#BPB-Normal", "https://bpbv2ray.xlz767.ip-ddns.com/sub/b9b8cf4c-29a3-4288-9c6c-8811dc37beec#BPB-Normal", "https://www.xlz767.ip-ddns.com/proxy.php?url=https://edgetunnelworker.xlz.workers.dev/f47ac10b-58cc-4372-a567-0e02b2c3d479", "https://raw.githubusercontent.com/ripaojiedian/freenode/main/sub", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/ss", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/vmess", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/trojan", "https://github.com/Huibq/TrojanLinks/raw/refs/heads/master/links/vless", "https://raw.githubusercontent.com/firefoxmmx2/v2rayshare_subcription/main/subscription/vray_sub.txt", "https://github.com/Roywaller/clash_subscription/raw/refs/heads/main/clash_subscription.txt", "https://q3dlaxpoaq.github.io/APIs/cg1.txt", "https://q3dlaxpoaq.github.io/APIs/cg3.txt", "https://q3dlaxpoaq.github.io/APIs/cg4.txt", "https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/Eternity", "https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/EternityAir", "https://raw.githubusercontent.com/snakem982/proxypool/main/source/v2ray.txt", "https://raw.githubusercontent.com/snakem982/proxypool/main/source/v2ray-2.txt" ]; // 存储唯一节点 $uniqueNodes = []; // CURL全局配置 $curl_options = [ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5, CURLOPT_CONNECTTIMEOUT => 3, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_FOLLOWLOCATION => true, CURLOPT_MAXREDIRS => 3, CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' ]; // 分批次处理(每批5个URL) $batchSize = 5; foreach (array_chunk($urls, $batchSize) as $urlChunk) { $mh = curl_multi_init(); $handles = []; // 初始化批处理请求 foreach ($urlChunk as $url) { $ch = curl_init($url); curl_setopt_array($ch, $curl_options); curl_multi_add_handle($mh, $ch); $handles[] = $ch; } // 执行并行请求 $active = null; do { $status = curl_multi_exec($mh, $active); if ($active && curl_multi_select($mh) === -1) { usleep(100); } } while ($active && $status == CURLM_OK); // 处理响应 foreach ($handles as $ch) { $content = curl_multi_getcontent($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode == 200 && !empty($content)) { $content = preg_replace('/\s+/', '', trim($content)); if (preg_match('/^[a-zA-Z0-9+\/]+={0,2}$/', $content)) { $decoded = base64_decode($content, true); if ($decoded !== false) { // 分割节点并去重 $nodes = array_filter(explode("\n", $decoded), function($line) { return !empty(trim($line)); }); foreach ($nodes as $node) { $cleanNode = trim($node); $uniqueNodes[$cleanNode] = true; // 利用键名去重 } } } } // 清理句柄 curl_multi_remove_handle($mh, $ch); curl_close($ch); } curl_multi_close($mh); } // 生成最终内容 $finalContent = implode("\n", array_keys($uniqueNodes)); $finalBase64 = !empty($finalContent) ? base64_encode($finalContent) : base64_encode(''); // 原子化写入缓存 $tempCache = tempnam(__DIR__, 'cache_temp'); if ($tempCache && file_put_contents($tempCache, $finalBase64)) { rename($tempCache, $cache_file); } // 输出结果 header("Content-Type: text/plain"); echo $finalBase64; ?>
2025年04月15日
2 阅读
0 评论
0 点赞
您是第
62966
位访客