首页站内杂志技术文摘
文章内容页

做谷歌SEO的福音(批量外链or网站留痕)

  • 作者:雨祺
  • 来源: 电脑原创
  • 发表于2025-05-19 17:19:53
  • 阅读0
  • 之前小编开贴有说利用Zblog搜索留下网站文本链接,可以叫低质外链也可以叫网站留痕。对百毒那是没有任何用的。据说对谷歌有点用处。百毒也很少用了,也没有收录到几个Zblog做的网站。效果也就是这样的。

    前不久开贴的时候也有老坛们说还不如用卢松松那个。

    试用了下,很肾虚。连有没有请求成功就没有,更何况那数据还是N年前的了。小编还是坚持自己收集。体验还是不错的哈。Zblog做的网站收集了几个,非常稳定。同时也包括本论坛的自媒体大佬松松总(也是Zblog做的)。前端效果:

    说了一大箩筐,怎么体验呢?还是三句不离本行。依然是进入聊天室,底部工具栏的实用工具图标点击就看到了哈愉快的在用Zblog做的网站上面留痕增加文本链接吧。下面我开始讲解做谷歌SEO的福音(批量外链or网站留痕)的教程吧。 先在\e\extend\wlseo下面建立个TXT文本库。命名为links.txt小编的文本库是
    links.rar
    links.rar
    前端的html代码
    1. <!-- 外链生成工具--> 
    2. <li> 
    3. <div class="data-group"
    4. <div style="display: flex; justify-content: space-between;"
    5.     <div style="display: flex; align-items: center; width: 60%; height: 35px; padding-right: 5px;"> <!-- 添加padding-right以减少间距 --> 
    6. <input id="seo-url"  placeholder="生成外链目标网址" required placeholder="示例:www.wenyunfang.com" autocomplete="off" style="outline: none; width: 100%; height: 30px;"
    7.     </div> 
    8.     <div style="display: flex; align-items: center;height: 35px; padding-left: 5px;"> <!-- 添加padding-left以减少间距 --> 
    9. <b>每页条数:</b><input id="seo-num"  placeholder="每页条数" min="1" max="30" value="15" required style="outline: none;height: 30px;width: 50%;text-align: center;"
    10.     </div> 
    11.             <div style="display: flex; align-items: center;height: 35px; padding-left: 5px;"> <!-- 添加padding-left以减少间距 --> 
    12. <b>间隔时间:</b><input id="seo-time"  placeholder="间隔时间" min="30" max="130" value="30" required style="outline: none;height: 30px;width: 50%;text-align: center;">秒 
    13.     </div> 
    14. <button class="seourl"  id="seo-startBtn" style="margin-top: 2px;width: 90px;">生成外链</button>         
    15. </div> 
    16. </div> 
    17. </li> 
    18. <div style="margin-left:-9px;border-bottom: 1px solid #cac6c6;"></div>         
    19. <!-- 外链生成工具--> 
    20. <div class="seo-result-box" style="display: none;"
    21. <div style="display: flex; justify-content: space-between; align-items: center;"
    22. <div style="display: flex; align-items: center;">当前页数:<span id="seo-currentPage" style="font-weight: 500; color: #333;">1</span></div> 
    23. <div style="display: flex; align-items: center;margin: 0 20px;">共收录<span id="seo-totalf" style="font-weight: 500; color: red;">0</span>条</div> 
    24. <div style="display: flex; align-items: center;">进度:<span id="seo-progress" style="font-weight: 500; color: #2c8df2;">0</span> / <span id="seo-total" style="font-weight: 500; color: red;">0</span> 条</div> 
    25. </div> 
    26. <table id="seo-tableBody"
    27. <thead> 
    28. <tr> 
    29. <th>序号</th> 
    30. <th>链接</th> 
    31. <th>状态</th> 
    32. </tr> 
    33. </thead> 
    34. <tbody></tbody> 
    35. </table> 
    36. </div> 
    前端需要的JS代码,记得引入JQ哈
    1. //外链群发工具 
    2. const SeoTool = { 
    3. isRunning: false
    4. currentPage: 1, 
    5. tableBody: $('#seo-tableBody tbody'), 
    6. resultBox: $('.seo-result-box'), 
    7. startBtn: $('#seo-startBtn'), 
    8. urlInput: $('#seo-url'), 
    9. numInput: $('#seo-num'), 
    10. timeInput: $('#seo-time'),  
    11. currentPageEl: $('#seo-currentPage'), 
    12. progressEl: $('#seo-progress'), 
    13. totalEl: $('#seo-total'), 
    14. totalElf: $('#seo-totalf'), 
    15. controller: null
    16. timeoutId: null,     
    17. init() { 
    18. this.startBtn.on('click', () => this.handleStartStop()); 
    19. },    
    20. handleStartStop() { 
    21. if (this.isRunning) { 
    22. this.stopProcess(); 
    23. else { 
    24. const url = this.urlInput.val();  
    25. const num = parseInt(this.numInput.val()) || 15; 
    26. const time = parseInt(this.timeInput.val()) || 30;   
    27. if (time < 30 || time > 130) { 
    28. layer.msg('间隔时间需设置为30-130秒!', { icon: 5, time: 2000, area: 'auto', type: 0, anim: 6 }); 
    29. return
    30. }         
    31. if (!this.validateUrl(url)) { 
    32. alert('请输入正确的域名(如:www.wenyunfang.com)'); 
    33. return
    34. }           
    35. this.resetResult(); 
    36. this.isRunning = true
    37. this.startProcess(url, num, time); 
    38. },    
    39. startProcess(url, num, time) { 
    40. this.resultBox.show(); 
    41. this.startBtn.text('停止生成'); 
    42. this.controller = new AbortController(); 
    43. const signal = this.controller.signal;         
    44. fetch(`/ecmsapi/index.php?mod=duomeiti&act=wlseo&page=${this.currentPage}&num=${num}`, {signal}) 
    45. .then(response => { 
    46. if (!this.isRunning) throw new Error('操作已停止'); 
    47. return response.json(); 
    48. }) 
    49. .then(data => { 
    50. if (!this.isRunning) return;                
    51. if (data.code === 1) { 
    52. this.stopProcess(); 
    53. alert('所有外链生成完成!'); 
    54. return
    55. }                
    56. this.tableBody.empty(); 
    57. const currentPage = this.currentPage; 
    58. this.updateTable(data, url, currentPage, num); 
    59. this.currentPage++;                
    60. this.timeoutId = setTimeout(() => { 
    61. if (this.isRunning) { 
    62. this.startProcess(url, num, time); 
    63. }, time * 1000); 
    64. }) 
    65. .catch(error => { 
    66. if (error.name !== 'AbortError' && error.message !== '操作已停止') { 
    67. this.stopProcess(); 
    68. }); 
    69. },    
    70. updateTable(urldata, targetUrl, currentPage, num) { 
    71. var rowsHtml = ''
    72. for (var i = 0; i < urldata.data.length; i++) { 
    73. var link = urldata.data[i]; 
    74. var encodedUrl = encodeURIComponent(targetUrl); 
    75. var formattedLink = link.replace('***', encodedUrl); 
    76. var serial = (currentPage - 1) * num + (i + 1); 
    77. var statusId = 'status_' + i;       
    78. rowsHtml += '<tr>'
    79. rowsHtml += '<td>' + serial + '</td>'
    80. rowsHtml += '<td><a href="' + formattedLink + '" target="_blank">' + formattedLink.substring(0, 66) + '</a></td>'
    81. rowsHtml += '<td><span id="' + statusId + '" class="seo-status" style="color:#FF9800;">发布中</span></td>'
    82. rowsHtml += '<td style="display:none;">'
    83. rowsHtml += '<iframe '
    84. rowsHtml += 'src="' + formattedLink + '" '
    85. rowsHtml += 'id="iframe_' + statusId + '" '
    86. rowsHtml += 'style="width:0;height:0;border:none;" '
    87. rowsHtml += 'onload="document.getElementById(\'' + statusId + '\').textContent=\'已生成\';document.getElementById(\'' + statusId + '\').style.color=\'#4CAF50\';" '
    88. rowsHtml += 'onerror="document.getElementById(\'' + statusId + '\').textContent=\'未生成\';document.getElementById(\'' + statusId + '\').style.color=\'#F44336\';" '
    89. rowsHtml += '>'
    90. rowsHtml += '</iframe>'
    91. rowsHtml += '</td>'
    92. rowsHtml += '</tr>'
    93. }    
    94. this.tableBody.html(rowsHtml); 
    95. this.updateProgress(urldata); 
    96. setTimeout(function() { 
    97. var statusElements = document.querySelectorAll('.seo-status'); 
    98. for (var i = 0; i < statusElements.length; i++) { 
    99. var statusEl = statusElements[i]; 
    100. if (statusEl.textContent === '发布中') { 
    101. statusEl.textContent = '未生成'
    102. statusEl.style.color = '#F44336'
    103. }, 5000); 
    104. },  
    105. updateProgress(urldata) { 
    106. const total = urldata.count; 
    107. const completed = (this.currentPage - 1) * urldata.data.length + urldata.data.length;       
    108. this.currentPageEl.text(this.currentPage); 
    109. this.progressEl.text(completed); 
    110. this.totalEl.text(total); 
    111. this.totalElf.text(total); 
    112. },    
    113. stopProcess() { 
    114. this.isRunning = false
    115. this.startBtn.text('重新开始');        
    116. if (this.controller) { 
    117. this.controller.abort(); 
    118. this.controller = null
    119. }        
    120. if (this.timeoutId) { 
    121. clearTimeout(this.timeoutId); 
    122. this.timeoutId = null
    123. },    
    124. resetResult() { 
    125. this.tableBody.empty(); 
    126. this.progressEl.text('0'); 
    127. this.totalEl.text('0'); 
    128. this.totalElf.text('0'); 
    129. this.resultBox.hide(); 
    130. this.currentPage = 1; 
    131. this.timeInput.val(30);  
    132. },   
    133. validateUrl(url) { 
    134. const regex = /^[^http\s/][\w.-]+\.[\w-]{2,}$/; 
    135. return regex.test(url); 
    136. }; 
    137. SeoTool.init(); 
    PHP后端参考我用帝国写的哈,其他的只需要改下常量,变量。如果是框架的,自行把自定义函数集成到类里面去。
    1. <?php 
    2. header('Access-Control-Allow-Origin: ' . rtrim($public_r['add_murl'], '/')); 
    3. defined("ECMSAPI_MOD") or exit; 
    4. $redisKey = 'seolinks_api:all_data'
    5. $redisMetaKey = 'seolinks_api:meta'
    6. // 检查文件更新并刷新缓存 
    7. function checkAndRefreshCache($filePath, $redis) { 
    8. global $redis, $redisKey, $redisMetaKey; 
    9. $currentMtime = filemtime($filePath); 
    10. $cachedMtime = $redis->hGet($redisMetaKey, 'mtime'); 
    11. if ($currentMtime > $cachedMtime) { 
    12. $count = countLines($filePath); 
    13. $redis->multi() 
    14. ->set($redisKey, json_encode(['count' => $count])) 
    15. ->hSet($redisMetaKey, 'mtime', $currentMtime) 
    16. ->hSet($redisMetaKey, 'update_time', time()) 
    17. ->exec(); 
    18. return $count; 
    19. return false
    20. // 计算行数 
    21. function countLines($filePath) { 
    22. if (!file_exists($filePath)) return 0; 
    23. $fp = fopen($filePath, 'rb'); 
    24. if (!$fp) return 0;    
    25. $count = 0; 
    26. $prev = null;    
    27. while (($byte = fgetc($fp)) !== false) { 
    28. if ($byte === "\n" || ($prev === "\r" && $byte !== "\n")) { 
    29. $count++; 
    30. $prev = $byte
    31. }     
    32. fclose($fp); 
    33. return $count; 
    34. // 获取分页数据 
    35. function getPageData($filePath, $page, $num) { 
    36. $offset = ($page - 1) * $num; 
    37. $data = []; 
    38. $fp = fopen($filePath, 'r'); 
    39. for ($i = 0; $i < $offset && !feof($fp); $i++) { 
    40. fgets($fp); 
    41. for ($i = 0; $i < $num && ($line = fgets($fp)) !== false; $i++) { 
    42. $data[] = trim($line); 
    43. }    
    44. fclose($fp); 
    45. return $data; 
    46. // 获取外链留痕数据 
    47. function getData($filePath, $redis) { 
    48. global $redis, $redisKey, $redisMetaKey; 
    49. $cachedData = $redis->get($redisKey);    
    50. if ($cachedData) { 
    51. $data = json_decode($cachedData, true); 
    52. $freshCount = checkAndRefreshCache($filePath, $redis); 
    53. return ['count' => $freshCount !== false ? (int)$freshCount : (int)($data['count'] ?? 0),'cached' => true]; 
    54. }    
    55. $count = countLines($filePath); 
    56. $currentMtime = filemtime($filePath); 
    57. $redis->multi() 
    58. ->set($redisKey, json_encode(['count' => $count])) 
    59. ->hMSet($redisMetaKey, ['mtime' => $currentMtime,'create_time' => time(),'update_time' => time()]) 
    60. ->exec();    
    61. return [ 
    62. 'count' => (int)$count, 
    63. 'cached' => false 
    64. ]; 
    65. $filePath = ECMS_PATH.'e/extend/wlseo/links.txt';//外链留痕数据文件 
    66. if (!file_exists($filePath)) { 
    67. die(json_encode(['code' => 404, 'msg' => '文件不存在'], 320)); 
    68. try { 
    69. $dataInfo = getData($filePath, $redis); 
    70. $count = $dataInfo['count']; 
    71. $isCached = $dataInfo['cached']; 
    72. catch (Exception $e) { 
    73. $count = (int)countLines($filePath); 
    74. $isCached = false
    75. $page = max(1, (int)($_GET['page'] ?? 1)); 
    76. $num = min(30, max(1, (int)($_GET['num'] ?? 15))); 
    77. $maxPage = $count > 0 ? max(1, ceil($count / $num)) : 1;  
    78. if ($page > $maxPage) { 
    79. die(json_encode(['code' => 1, 'msg' => '已完成!'], 320)); 
    80. $data = getPageData($filePath, $page, $num); 
    81. $cacheStatus = $isCached ? ($dataInfo['freshCount'] ?? 'hit') : 'miss'
    82. if (isset($dataInfo['freshCount'])) { 
    83. $cacheStatus = $dataInfo['freshCount'] !== false ? 'refreshed' : 'hit'
    84. else { 
    85. $cacheStatus = $isCached ? 'hit' : 'miss'
    86. echo json_encode([ 
    87. 'code' => 200, 
    88. 'title' =>'SEO超级外链工具'
    89. 'data' => $data, 
    90. 'sitename' => $public_r['sitename'], 
    91. 'count' => $count, 
    92. 'page' => $page, 
    93. 'pagesize' => $num, 
    94. 'maxpage' => $maxPage, 
    95. 'cache_status' => $cacheStatus, 
    96. 'cache_meta' => $redis->hGetAll($redisMetaKey) 
    97. ], 320); 
    不能照抄,因为小编在帝国的核心函数里面已经把redis链接已经初始化了,自定义函数里面只需要作为全局变量就缓存生成读取都生效了。外链留痕数据TXT文件更新了会自动更新缓存的。

    这样就能愉快的给Zblog做的网站留下你的网址了每天没卵事或者WIN服务器的刷刷还是可以的哈。无副作用的,放心用!!!
    【审核人:站长】

        标题:做谷歌SEO的福音(批量外链or网站留痕)

        本文链接:https://www.wenyunfang.com/zazhi/zhongwangjiaocheng/1409.html

        赞一下

        深度阅读

        • 您也可以注册成为文韵坊的作者,发表您的原创作品、分享您的心情!

        阅读记录

          关注文韵坊