ǰλã >> ̳ >> ASP̳ >> ASP >>
Ƽ
½̳
ȵ̳
  
վת
ߣxinyun
ڣ2005-03-01
Ͷ壺xinyun(ԭ)
Դhttp://www.skyeye78.com
С
ղأղ
ģ
1.gb.asp


<%
'ȡɵhtml
Function GetHTTPPage(url)
dim XmlHttp
set XmlHttp=Server.createobject("Microsoft.XMLHTTP")
XmlHttp.open "GET",url,false
XmlHttp.send()
'getHTTPPage=Http.responseText
if XmlHttp.readystate<>4 then exit function
GetHTTPPage=bytes2BSTR(XmlHttp.responseBody)
set XmlHttp=nothing
if err.number<>0 then err.Clear
End Function
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
BytesStream.Type = 2
BytesStream.Open
BytesStream.WriteText vin
BytesStream.Position = 0
BytesStream.Charset = "GB2312"
BytesStream.Position = 2
StringReturn =BytesStream.ReadText
BytesStream.close
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function

'תеҳָ
sub splitwords(words)
into=words
out=""
'response.write ":"&len(into)&"<br>"
for i=1 to len(into) 'ѭÿַ
'response.write "ѭ"&i&"/"&len(into)&",ʼַ"&mid(into,i,1)&"<br>"
if ascw(mid(into,i,1))<0 or ascw(mid(into,i,1))>255 then 'Ǽ,׶
code=instr(application("gb"),mid(into,i,1)) 'ȡַڼֿеλ
if code then'ڼֿг
out=out&mid(application("other_language"),code,1) 'ڷֿӦķ
'response.write ""&i&"ַ:"&mid(application("other_language"),i,1)&"<br>"
else
out=out&mid(into,i,1) 'ԭ
'response.write ""&i&"ַ"&mid(into,i,1)&"<br>"
end if
else
out=out&mid(into,i,1) 'ԭ
'response.write ""&i&"ַ"&mid(into,i,1)&"<br>"
end if
next
response.write out
end sub


function change(words)
dim gb,other_language,into,out,code,wordsnum,i
wordsnum=300 'ҳַ
'ֿ
application("gb")="רҵԶ˿ɥΪϰبDzĶڽزǼŻɡΰα½ȿ٭ٯٶٱٲٳծdzϴжڸԲдũݷƾۻմɾɲܼнȰ۽ѫҽЭ¬±ȴ᳧ѹDzó˫Ҷ̾ߴ߼߽Ż߿ԱǺӽܻӴ﻽Х԰ΧͼԲʥ۳̳ް׹¢ݿѵǵǽ׳Ǻͷжۼܽױ¦欽Ӥѧʵܹ޶ѰٽҢϾ᫸ᰵϿո۹ϱ˧ʦĴ֡ݹ®пӦӷ޿߱䵯ǿ鵱¼峹黳̬Ҷҳͱ㫲ѵ㳷Ϸս꯻ִɨŸҿ£ӵšֿ̢Юӵ񻻵°§Яҡ̯ߢߣߥܵին޾ʱԽɱȨ迼ǹդջж嵵׮μ¥鷼ƺӣͳݻŷŹ챱ϱձۻ㺺ڹûŽٲŢкdzDz䫼䯻ŨлɬԨ½ʪб̲ΫDZֲ¯˸̷ǻ̽ȻⰮүǣ״̱ʨè̡⻷巩걵续ű񴯷Ӹ컾̱Ѣ񲰨յμǵغש˶ȷﰭ׼»ͺػƻ˰Ҥѿȼɸݳǩ¨ֽԼγ硴ɴڷֽƷŦϸ֯称ᆳ窰޽笻Ѥͳ篾м簼糴ά緱׺罼翼綶ĻƱԵƸǷɲӧٽ޷ʳְ೦веʤֽŧսܼ«έɲƻ뾣ٻӫݡݣݥݦҩݰݪݫݲݵӨݺөӪ޽Ǿޭ޴޺²ϺʴӬЫβϮװϿܼ۹ܼƶϼڦڧڨѵѶǽکڪګϷþ֤ڬڭʶթڮߴڰگڱڲڳڴʫڵڶڷڸڹѯںڻڼڽھջڿ˵ŵ·̿˭ŵ׻̸ıȵгνβлҥǫ׽á̷Ǵ߱긺Ͱ˻ʷ̰ƶṺܴᷡóѺ޼ֻ¸޸ʹ׸׬ӮԸԾȼӻתԹꣷԯϽշꥴDZɴǨ˻ԶΥɼѡѷңۣۦ֣۩۪ǵͽͼ붤̷θҶ۳ƱԿվٹťǮǯܲǦíͭաϳ綠ҿ﮳ﲷпêസ׶Ķ̶þָF޾ⳤƱʴȼբ̷ֹղ۶׼½¤ѳΤͺҳ˳˶Ԥ­ľƵӱնȧƮ쭷мα¶ýȱĶڹȲԦѱ¿ʻפ溧鿥ƭɧ³ֱ𯼦ŸѻѼԧȵϺӥ촳ȣ"
'(),ͼһһӦ
application("other_language")="fcI|zGɇʂRexlIy̝aHC|Hā}xrゥt΁wLbHeɂȃS~zRzAEfhmPdƝBFσȌԌ܊rT_QrQDpCPD{PctheqxkՄӄńڄ݄ׄQT^tAfuRuPlsSdvBNhpl׃B~̖@\Άᇍ Džȇ`҇IhTJ܆ԁ푆}^􇂇WчOZK݇ʇ[Dˇu‡ڇ̈F@DA}ĉKԉȉΉ]ʼn׉|NP_q•͉̎^AZYJ^WyDIƋɌDʋzȋ܋ԋߌOW\meیmLMӌόÌٌҌՎZqM獏suXhF{nVp^ŎÎ͎ΎVc]T쑪RU[_sw䛏؏ƑԑnёBZYzِaQÐŐґa@֑K͑vܑMTC|ؑБߑ̔UВߓP_ᒁoMnrQܓ񓴔钶ϓגD]ƓpQvSۓvRyzd[uPtΔfX]x\S̔ؔofrҕ@xԕϕXCslqOЗnfdŘ˗ɗژ䗫ә藿EnuzИEǙ™ΙM{љ_geW{ݞ֚КښRhϛ]arS朿I͞{oTaɛܝDќ\{yҝgG❡Ziuo읙q՜YOn^uƝOcB؞񝢞RsLM]VEIutHz|l`ĠNtcqNTZCa៨Fc۠ޠ٠EqNM{bzsCJMi؈IH^|hFtkmqIaT늮XObdWABwDTca`]_d}K}OwIP[AGmC\VXauZa[AT_|K~|RY\AUxdNzeQxdwF`[GZCQ]MQVSPa{\e`Y~IjDXjt@hf[egcSZRo{mutqwvswkoxV{v]y~CMKUOEIB[HqY@WLok{j^gyCd^wcm_pbiKSdRI^JC`UGYl~|}|DEP|N`dbpcprOV_~zwtsi`RQUyW_PT`buwNe–u™@šœ“˜”CcwaI[Û{đٖVFÄz}ĒKĚXēL_ÓTĘDāevĜݛŜŞœADGˇdGʏJɐȔ˞{OnrKOod\LOGvʁɜwCjʎsȝΟn|paȇˎWRɏPnW@~L}ΞIMʒ_[rʉYV{EyʚvN`A@I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od wordsnum) 'ʣַ
end if
else
splitwords words
end if
end function

page_action="http://"&Request.ServerVariables("HTTP_HOST")&Request.ServerVariables("PATH_INFO")'ȡIEַ
t1=now()
change GetHTTPPage(page_action)
t2=now()
response.write"<center>ASP"&cstr(cdbl((t2-t1)*24*60*60))&"</center>"
response.end
%>

2.ifgb.asp
<%if request.cookies("timer")<>"" or request.cookies("timer")<>empty then%>
<!--#include file="gb.asp"-->
<%end if%>

3.setcookies.asp
<%
if request.cookies("timer")="" or request.cookies("timer")=empty then
response.cookies("timer")="seted"
else
response.cookies("timer")=""
end if
response.redirect request.servervariables("HTTP_REFERER")
%>



ʹ˵
1.ֿ,ֿĩβӣעҪһһӦ
2.Ҫмתҳ磺<A href="setcookies.asp">ת</a>,һվļõʽֻ޸һɡ
3.ڴм<!--#include file="ifgb.asp"-->ɣ˰ļڴ붥(ڲcookiesԵ)ҲɿDzsessionֻӸ



תע
ߣ QQ:81224739 MSN:qxd@17u.net
ҳ:http://www.skyeye78.com
£