Dim Domain,url,url1,strpage,strpage1
Dim xmldom,sd,site,dimg
Domain = Request. QueryString ("url")
If domain = "" Then domain = "alixixi.com"
If not iswww (domain) Then
Response.Write "<script>alert (' the URL you entered is invalid, please re-enter!") ') </script> "
Domain = "alixixi.com"
End If
Host = "Alexa.alixixi.com"
If left (domain,7) = "http://" then
Domain=right (Domain,len (domain)-7)
End If
If InStr (Domain, "/") <>0 Then
Domain=left (domain,instr (Domain, "/")-1)
End If
On Error Resume Next
Function iswww (STRNG)
Iswww = False
Dim RegEx, Match
Set regEx = New RegExp
Regex.pattern = "^w+" (-w+) | (. w+)) *[a-za-z0-9]+ ((. | -) [a-za-z0-9]+] *. [a-za-z]+$]
Regex.ignorecase = True
Set Match = Regex.execute (strng)
If Match.count then iswww= true
End Function
Function GetPage (Path)
t = GetBody (Path)
Getpage=bytestobstr (T, "UTF-8")
End Function
Function GetPage2 (Path)
t = GetBody (Path)
Getpage2=bytestobstr (T, "GB2312")
End Function
Function getbody (URL)
On Error Resume Next
Set retrieval = CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open "Get", url, False, "", ""
. Send
GetBody =. Responsebody
End With
Set retrieval = Nothing
End Function
function Fget (str)
Select Case Trim (str)
Case ""
Fget = "--"
Case Else
Fget = str
End Select
End Function
Function Bytestobstr (Body,cset)
Dim objstream
Set objstream = Server.CreateObject ("ADODB.stream")
Objstream. Type = 1
Objstream. Mode =3
Objstream. Open
Objstream. Write body
Objstream. Position = 0
Objstream. Type = 2
Objstream. Charset = Cset
Bytestobstr = objstream. ReadText
Objstream. Close
Set objstream = Nothing
End Function
Function fixstr (ByVal str, ByVal start, ByVal last, ByVal N)
Dim strtemp
On Error Resume Next
If InStr (str, start) > 0 Then
Select Case N
Case 0
strtemp = Right (str, Len (str)-INSTR (str, start)-Len (start) + 1)
strtemp = Left (strtemp, InStr (strtemp, last)-1)
Case Else
strtemp = Right (str, Len (str)-INSTR (str, start) + 1)
strtemp = Left (strtemp, InStr (strtemp, last) + Len (last)-1)
End Select
Else
strtemp = ""
End If
Fixstr = strtemp
End Function
Function Comma (str)
If Not (IsNumeric (str)) Or str = 0 Then
result = 0
ElseIf Len (Fix (str)) < 4 Then
result = Str
Else
Pos = Instr (1,str, ".")
If Pos > 0 Then
Dec = Mid (Str,pos)
End If
Res = StrReverse (Fix (str))
Loopcount = 1
While Loopcount <= Len (Res)
Tempresult = Tempresult + Mid (res,loopcount,3)
Loopcount = Loopcount + 3
If loopcount <= Len (Res) Then
Tempresult = Tempresult + ","
End If
Wend
result = StrReverse (tempresult) + Dec
End If
Comma = result
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service