php实现把url转换迅雷thunder资源下载地址的方法,
本文实例讲述了php实现把url转换迅雷thunder资源下载地址的方法。分享给大家供大家参考。具体方法分析如下:
如果你知道迅雷地址的生成规则你就不觉得迅雷的url资源下载地址有多么复杂了,
其实雷的地址就是原url前面带AA后面带BB之后再base64_encode编码即可
如下例子所示:
复制代码 代码如下:
function Thunder($url, $type='en') {
$url ='http://www.bkjia.com';
if($type =='en'){
return "thunder://".base64_encode("AA".$url."ZZ");
}else{
return substr(base64_decode(substr(trim($url),10)),2,-2);
}
}
$url ='http://www.bkjia.com';
echo Thunder($url);
?>
输出结果:
thunder://QUFodHRwOi8vd3d3LmpiNTEubmV0Wlo=
希望本文所述对大家的php程序设计有所帮助。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
