<%
err.clear
On Error Resume Next
if isempty(request("linkexg")) then
ls_host=Request.ServerVariables("HTTP_HOST")
ls_p=split(ls_host,":")
ls_host=ls_p(0)
ls_host=LCase(ls_host)
ls_host=replace(ls_host,"www.","")
lsfn_content="linkex_content_asp_lian666-com-"+ls_host+".txt"
lsfn_time="linkex_time_asp_lian666-com-"+ls_host+".txt"
set linkex_fs=Server.CreateObject("Scripting.FileSystemObject")
ls_time=cstr(day(now()))
set linkex_tfile=linkex_fs.OpenTextFile(server.MapPath(lsfn_content),1,True,True)
if err.number<>0 then
err.clear
ls_content=""
else
ls_content=linkex_tfile.readall
end if
if ls_content="" or not isempty(request("lex_reload")) then
err.clear
set linkex_tfile=linkex_fs.createtextfile(server.MapPath(lsfn_time))
linkex_tfile.write ls_time
if err.number=0 then
ls_content=lexgetHTTPPage("http://lian666.com/?v=1&t=php&qdomain="+Request.ServerVariables("HTTP_HOST")+"&f="+Request.ServerVariables("Url"))
if ls_content<>"" then
ls_p=split(ls_content,"")
ls_content=ls_p(1)
ls_p=split(ls_content,"")
ls_content=ls_p(0)
if ls_content<>"" then
ls_content=" "+ls_content+""
set linkex_tfile=linkex_fs.createtextfile(server.MapPath(lsfn_content),true,true)
linkex_tfile.write ls_content
end if
end if
else
ls_content="
error: cant write file. please create 2 files ("+lsfn_content+", "+lsfn_time+") and change the mod of this file into writeable (755), then click reload.