數碼中文坊

 取回密碼
 我要註冊
檢視: 1768|回覆: 2

[分享] [Discuz! X 系列]文章內文外部鏈結仿google重新導向頁

[複製連結]
發表於 2020-4-23 22:26:39 | 顯示全部樓層 |閱讀模式

發佈類型: 正體(繁體)化
Discuz! 版本: X 1.x X 2.0 X 2.5 X 3.0 X 3.1 X 3.2 X 3.3 
下載網址: https://www.google.com/url?q=https://iothk.in
對映網址:

馬上註冊,結交更多好友,享用更多功能,讓你輕鬆瀏覽論壇。

你需要 登入 才可以下載或檢視,沒有帳號?我要註冊

x
本文章最後由 iothk 於 2020-4-28 08:17 PM 編輯

請尊重智慧產權,轉載包括原著資訊,感謝合作及使用
原著 : Internet of Talking講聯網
code修正參照  : https://www.discuz.net/thread-2575753-1-1.html
source/function尋找「!$scheme」將
  1. }
  2. preg_match("/^http:\/\/[^\/]+/",$url,$matchs);
  3. $allowURL = array(".in");//这个是允许的域名
  4. if(!in_array(substr($matchs[0],7),$allowURL)){
  5.   $url = "./url.php?url=".base64_encode($url);//这个是跳转后的网址,
  6. //url使用的base64_encode加密方式,用base64_decode解密就行
複製代碼
添在「!$scheme ? $_G['siteurl'].$url : $url;」後

再upload
url.php
  1. <html lang="zh-HK">
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  4. <title>重新導向通知</title>

  5. </head>
  6. <body>

  7. <b>重新導向通知</b>&nbsp;上一頁正將您轉往【<?php $url=$_GET['url']; echo base64_decode($url);?>】<input type="button" value="繼續存取" onclick="show()">。<br><br>&nbsp;<br><br><br>

  8. 若您不想瀏覽此頁,您可<input type="button" value="返回上一頁" onclick="Dir()">。
  9. <script>
  10. function Dir() {
  11.   window.location.assign("./forum.php")
  12. }
  13. function show() {
  14.   window.location.assign("<?php $url=$_GET['url']; echo base64_decode($url);?>")
  15. }
  16. </script>
  17. </body>
  18. </html>
複製代碼

去root
檔案參照文 : https://www.discuz.net/thread-1375512-1-1.html
http://www.inlojv.com/4148.html



 樓主| 發表於 2020-4-25 16:56:54 | 顯示全部樓層

del

本文章最後由 iothk 於 2020-4-25 04:58 PM 編輯

del
del
del
del
del

發表於 2020-8-16 00:07:00 | 顯示全部樓層
謝謝版大提供技術,挺有用的
你需要登入後才可以回覆 登入 | 我要註冊

本版積分規則

Archiver|禁閉室|手機版|數碼中文坊

GMT+8, 2024-4-20 09:44 PM

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回覆 返回頂端 返回清單