CheckComeUrl.asp 623 B

123456789101112131415161718
  1. <%
  2. dim cUrl
  3. ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
  4. if ComeUrl="" then
  5. response.write "<br><p align=center><font color='red'>Access deny!</font></p>"
  6. response.end
  7. else
  8. cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
  9. if mid(ComeUrl,len(cUrl)+1,1)=":" then
  10. cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
  11. end if
  12. cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
  13. if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) then
  14. response.write "<br><p align=center><font color='red'>Access deny!</font></p>"
  15. response.end
  16. end if
  17. end if
  18. %>