asp MD5¼ÓÃܺ¯Êý
<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)
Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBits = 31 Then
If lValue And 1 Then
LShift = &H80000000
Else
LShift = 0
End If
Exit Function
ElseIf iShiftBits < 0 Or iShiftBits > 31 Then
Err.Raise 6
End If
If (lValue And m_l2Power(31 - iShiftBits)) Then
LShift = ((lValue And m_lOnBits(31 - (iShiftBits + 1))) * m_l2Power(iShiftBits)) Or &H80000000
Else
LShift = ((lValue And m_lOnBits(31 - iShiftBits)) * m_l2Power(iShiftBits))
End If
End Function
Private Function RShift(lValue, iShiftBits)
If iShiftBits = 0 Then
RShift = lValue
Exit Function
ElseIf iShiftBits = 31 Then
If lValue And &H80000000 Then
RShift = 1
Else
RShift = 0
End If
Exit Function
ElseIf iShiftBits < 0 Or iShiftBits > 31 Then
Err.Raise 6
End If
RShift = (lValue And &H7FFFFFFE) \ m_l2Power(iShiftBits)
If (lValue And &H80000000) Then
RShift = (RShift Or (&H40000000 \ m_l2Power(iShiftBits - 1)))
End If
End Function
Private Function RotateLeft(lValue, iShiftBits)
RotateLeft = LShift(lValue, iShiftBits) Or RShift(lValue, (32 - iShiftBits))
End Function
Private Function AddUnsigned(lX, lY)
Dim lX4
Dim lY4
Dim lX8
Dim lY8
Dim lResult
lX8 = lX And &H80000000
lY8 = lY And &H80000000
lX4 = lX And &H40000000
lY4 = lY And &H40000000
lResult = (lX And &H3FFFFFFF) + (lY And &H3FFFFFFF)
If lX4 And lY4 Then
lResult = lResult Xor &H80000000 Xor lX8 Xor lY8
ElseIf lX4 Or lY4 Then
If lResult And &H40000000 Then
lResult = lResult Xor &HC0000000 Xor lX8 Xor lY8
Else
lResult = lResult Xor &H40000000 Xor lX8 Xor lY8
End If
Else
lResult = lResult Xor lX8 Xor lY8
End If
AddUnsigned = lResult
End Function
Private Function md5_F(x, y, z)
md5_F = (x And y) Or ((Not x)
Ïà¹ØÎĵµ£º
±¾ÎÄÁ´½Ó£ºhttp://www.oversteper.com/wprogram/asp/826.html
ASP ¶¨Òå³£Á¿µÄ·½·¨
³£Á¿£ºÓÃÒ»ÖÖÃû³Æ´úÌæÊý×ÖºÍ×Ö·û´®£¬ÇÒÆäÖµ±£³ÖÒ»Ö±²»±ä¡£
ÔÚ VBscript ÖУ¬¿ÉÒÔÓà const Óï¾äÀ´¶¨Òå³£Á¿¡£
³£Á¿·ÖÊý×ÖÐͺÍ×Ö·û´®ÐÍ¡£
±íʾÈÕÆÚµÄ³£Á¿Ð´ÔÚÁ½¸ö # Ö®¼ä¡£
ʾÀý£º
ÒÔÏÂΪÒýÓÃÄÚÈÝ£º
<%@LANGUAGE="VBSCRIPT" CODEPAG ......
±¾ÎÄÁ´½Ó£ºhttp://www.oversteper.com/wprogram/asp/827.html
Ìõ¼þÓï¾äÖ® if ... then ... else Óï¾ä
ÓÃÀ´ÅжÏÌõ¼þÊÇ true »ò false £¬²¢¸ù¾ÝÅжϽá¹ûÀ´Ö´ÐÐÖ¸¶¨µÄÓï¾ä£¬Í¨³£Ìõ¼þÊÇÓñȽÏÔËËã·û¶ÔÖµ»ò±äÁ¿½øÐбȽÏÀ´±í´ï¡£
if ... then ... else ¿ÉÒÔ¸ù¾ÝÐèÒª½øÐÐǶÌ×ʹÓ㬿ÉÒÔд³É elseif ¡£
ʾÀý£º
ÒÔÏÂÎ ......
±¾ÎÄÁ´½Ó£ºhttp://www.oversteper.com/wprogram/asp/828.html
Ìõ¼þÓï¾äÖ® select case Óï¾ä
1¡¢¶àÌõ¼þ·ÖÖ§µÄʱºòÓÅÏÈʹÓÃselect case½á¹¹£»
2¡¢Êý×ֵĴóÁ¿ÁоÙʱ×îºÃʹÓÃselect case
3¡¢±ØÐëʹÓà end select À´½áÊø·ÖÖ§½á¹¹
ʾÀý£º
ÒÔÏÂΪ ......
±¾ÎÄÁ´½Ó£ºhttp://www.oversteper.com/wprogram/asp/830.html
do ... loop Óï¾äÁ½ÖÖ¸ñʽµÄʾÀý
do whil ... loop £º
ÒÔÏÂΪÒýÓÃÄÚÈÝ£º
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt ......
ASP²É¼¯-ASP²É¼¯³ÌÐòÔÀí
²É¼¯³ÌÐòµÄÖ÷Òª²½ÖèÈçÏ£º
Ò»¡¢»ñÈ¡±»²É¼¯µÄÒ³ÃæµÄÄÚÈÝ
¶þ¡¢´Ó»ñÈ¡´úÂëÖÐÌáÈ¡ËùÓÐÓõÄÊý¾Ý
Ò»¡¢»ñÈ¡±»²É¼¯µÄÒ³ÃæµÄÄÚÈÝ
ÎÒĿǰËùÕÆÎÕµÄASP³£ÓûñÈ¡±»²É¼¯µÄÒ³ÃæµÄÄÚÈÝ·½·¨£º
1¡¢ÓÃserverXMLHTTP×é¼þ»ñÈ¡Êý¾Ý
ÒÔÏÂÄÚÈÝΪ³ÌÐò´úÂë:
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
Function GetBody(weburl)
&n ......