Heim > Backend-Entwicklung > PHP-Tutorial > php 生成迅雷快车旋风链接_PHP教程

php 生成迅雷快车旋风链接_PHP教程

WBOY
Freigeben: 2016-07-13 17:43:13
Original
881 Leute haben es durchsucht

<ol class="dp-c">
<li class="alt"><span><span><?php   </span></span></span></li>
<li><span><span class="keyword">function</span><span> zhuanhuan() {  </span></span></li>
<li class="alt"><span>    <span class="vars">$urlodd</span><span>=</span><span class="func">explode</span><span>(</span><span class="string">//</span><span>,</span><span class="vars">$_GET</span><span>[</span><span class="string">"url"</span><span>],2);//把链接分成2段,//前面是第一段,后面的是第二段  </span></span></li>
<li><span>    <span class="vars">$head</span><span>=</span><span class="func">strtolower</span><span>(</span><span class="vars">$urlodd</span><span>[0]);</span><span class="comment">//PHP对大小写敏感,先统一转换成小写,不然 出现HtTp:或者ThUNDER:这种怪异的写法不好处理 </span><span> </span></span></li>
<li class="alt"><span>    <span class="vars">$behind</span><span>=</span><span class="vars">$urlodd</span><span>[1];  </span></span></li>
<li><span>    <span class="keyword">if</span><span>(</span><span class="vars">$head</span><span>==</span><span class="string">"thunder:"</span><span>){  </span></span></li>
<li class="alt"><span>        <span class="vars">$url</span><span>=</span><span class="func">substr</span><span>(</span><span class="func">base64_decode</span><span>(</span><span class="vars">$behind</span><span>), 2, -2);</span><span class="comment">//base64解密,去掉前面的AA和后面ZZ </span><span> </span></span></li>
<li><span>    }<span class="keyword">elseif</span><span>(</span><span class="vars">$head</span><span>==</span><span class="string">"flashget:"</span><span>){  </span></span></li>
<li class="alt"><span>        <span class="vars">$url1</span><span>=</span><span class="func">explode</span><span>(</span><span class="string">&</span><span>,</span><span class="vars">$behind</span><span>,2);  </span></span></li>
<li><span>        <span class="vars">$url</span><span>=</span><span class="func">substr</span><span>(</span><span class="func">base64_decode</span><span>(</span><span class="vars">$url1</span><span>[0]), 10, -10);</span><span class="comment">//base64解密,去掉前面后的[FLASHGET] </span><span> </span></span></li>
<li class="alt"><span>    }<span class="keyword">elseif</span><span>(</span><span class="vars">$head</span><span>==</span><span class="string">"qqdl:"</span><span>){  </span></span></li>
<li><span>        <span class="vars">$url</span><span>=</span><span class="func">base64_decode</span><span>(</span><span class="vars">$behind</span><span>);</span><span class="comment">//base64解密 </span><span> </span></span></li>
<li class="alt"><span>    }<span class="keyword">elseif</span><span>(</span><span class="vars">$head</span><span>==</span><span class="string">"http:"</span><span>||</span><span class="vars">$head</span><span>==</span><span class="string">"ftp:"</span><span>||</span><span class="vars">$head</span><span>==</span><span class="string">"mms:"</span><span>||</span><span class="vars">$head</span><span>==</span><span class="string">"rtsp:"</span><span>||</span><span class="vars">$head</span><span>==</span><span class="string">"https:"</span><span>){  </span></span></li>
<li><span>        <span class="vars">$url</span><span>=</span><span class="vars">$_GET</span><span>[</span><span class="string">"url"</span><span>];</span><span class="comment">//常规地址仅支持http,https,ftp,mms,rtsp传输协议,其他地貌似很少,像XX网盘实际上也是基于base64,但是有的解密了也下载不了 </span><span> </span></span></li>
<li class="alt"><span>    }<span class="keyword">else</span><span>{ </span></span></li>
<li><span>        <span class="func">echo</span><span> </span><span class="string">"本页面暂时不支持此协议"</span><span>; </span></span></li>
<li class="alt"><span>    }  </span></li>
<li><span>    <span class="keyword">return</span><span> </span><span class="vars">$url</span><span>;  </span></span></li>
<li class="alt"><span>}  </span></li>
<li><span><span class="keyword">if</span><span>(</span><span class="vars">$_GET</span><span>[</span><span class="string">"url"</span><span>]!=NULL){  </span></span></li>
<li class="alt"><span>    <span class="vars">$url</span><span>=zhuanhuan(</span><span class="vars">$_GET</span><span>[</span><span class="string">"url"</span><span>]);  </span></span></li>
<li><span>    <span class="vars">$url_thunder</span><span>=</span><span class="string">"thunder://"</span><span>.</span><span class="func">base64_encode</span><span>(</span><span class="string">"AA"</span><span>.</span><span class="vars">$url</span><span>.</span><span class="string">"ZZ"</span><span>);//base64加密,下面的2也一样  </span></span></li>
<li class="alt"><span>    <span class="vars">$url_flashget</span><span>=</span><span class="string">"Flashget://"</span><span>.</span><span class="func">base64_encode</span><span>(</span><span class="string">"[FLASHGET]"</span><span>.</span><span class="vars">$url</span><span>.</span><span class="string">"[FLASHGET]"</span><span>).</span><span class="string">"&aiyh"</span><span>;  </span></span></li>
<li><span>    <span class="vars">$url_qqdl</span><span>=</span><span class="string">"qqdl://"</span><span>.</span><span class="func">base64_encode</span><span>(</span><span class="vars">$url</span><span>); </span></span></li>
<li class="alt"><span>}  </span></li>
<li><span>?>  </span></li>
<li class="alt"><span><form> </form></span></li>
<li><span>bkJia.com 请输入普通链接或者迅雷,快车,旋风链地址:  </span></li>
<li class="alt">
<span><input class="string">"url"</span><span> size=</span><span class="string">"80"</span><span>>  </span>
</li>
<li>
<span><input class="string">"转换"</span><span>>  </span>
</li>
<li class="alt"><span>  </span></li>
<li>
<span><p>实际地址:<a class="string">"<?php  echo $url;?>"</a></p></span><span> target=</span><span class="string">"_blank"</span><span>><?php  </span><span class="func">echo</span><span> </span><span class="vars">$url</span><span>;?>  </span></span>
</li>
<li class="alt">
<span><p>迅雷链:<a class="string">"<?php  echo $url_thunder;?>"</a></p></span><span> target=</span><span class="string">"_blank"</span><span>><?php  </span><span class="func">echo</span><span> </span><span class="vars">$url_thunder</span><span>;?>  </span></span>
</li>
<li>
<span><p>快车链:<a class="string">"<?php  echo $url_flashget;?>"</a></p></span><span> target=</span><span class="string">"_blank"</span><span>><?php  </span><span class="func">echo</span><span> </span><span class="vars">$url_flashget</span><span>;?>  </span></span>
</li>
<li class="a						</p>
<p align=" left>
<div style="display:none;">
<span id="url" itemprop="url">http://www.bkjia.com/PHPjc/478843.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http://www.bkjia.com/PHPjc/478843.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">?php function zhuanhuan(){ $urlodd = explode ( // , $_GET [ url ],2);//把链接分成2段,//前面是第一段,后面的是第二段 $head = strtolower ( $urlodd [0]); //PHP对大...</span>
</div>
<div class="art_confoot"></div>
</li>
</ol>
Nach dem Login kopieren
Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage