回帖变美女asp源码(挺有意思)

[复制链接]
查看: 1125   回复: 2
发表于 2007-6-3 16:44:33 | 显示全部楼层 |阅读模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. Function AllPath()
  4. Dim Domain,GFilePath
  5. Domain = Request.ServerVariables("SERVER_NAME")
  6. GFilePath = Request.ServerVariables("PATH_INFO")
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的图片目录如果是在http://xxxx/myfile/angie/pic,这里就写http://xxx.com/myfile/angie/ ;
  9. End Function
  10. Function ShowFileList(folderspec)
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
  12. Path = Server.MapPath(folderspec)
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  14. If objFSO.FolderExists(Path) Then
  15. Set objFolder = objFSO.GetFolder(Path)
  16. count = 0
  17. For Each objFile in objFolder.Files
  18. count = count+1
  19. Next
  20. randomize
  21. nume = Int((count*rnd)+1)
  22. S = 0
  23. ShowFileList = ""
  24. For Each objFile in objFolder.Files
  25. S = S + 1
  26. If S = nume Then
  27. ShowFileList = objFile.Name
  28. Exit For
  29. End If
  30. Next
  31. Set objFolder = Nothing
  32. Else
  33. ShowFileList = "NO"
  34. End If
  35. Set objFSO = Nothing
  36. End Function
  37. Dim list,filename,address,str
  38. list = trim(Request.QueryString("list"))
  39. if list = "" then
  40. Response.write "本页需要正确参数引入,您缺少相关的参数!正确格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg"
  41. Response.End()
  42. end if
  43. filename = ShowFileList("./"&list&"/")
  44. if filename = "NO" then
  45. Response.write "您指定的目录<b>"&list&"</b>不存在,请重新指定!"
  46. Response.End()
  47. end if
  48. if filename = "" then
  49. Response.write "您指定的目录<b>"&list&"</b>没有相关的图片文件存在,请重新指定!"
  50. Response.End()
  51. end if
  52. str = right(filename,3)
  53. if str<>"jpg" and str<>"gif" then
  54. filename = "erro.gif"
  55. end if
  56. address = AllPath&list&"/"
  57. address = address&filename
  58. %>
  59. <%Response.redirect(address)%>
  60. 把这段代码保存为im.asp
  61. 把美女图片放在pic文件夹下,把pic文件夹和im.asp放在网站根目录下,在浏览器里打开演
复制代码

[ 本帖最后由 tcbxh2008 于 2007-6-3 16:47 编辑 ]
发表于 2007-6-9 21:55:56 | 显示全部楼层
呵呵,这个玩过的哦,不错的`
回复 支持 反对

使用道具 举报

发表于 2007-7-30 13:07:24 | 显示全部楼层
看看
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则