过期域名预定抢注

 找回密碼
 免费注册

回帖變美女asp源碼(挺有意思)

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 1 S- |% |  ]: Y
  2. <%
    5 }+ J+ [6 b( i$ _
  3. Function AllPath() 0 n( b: H; x5 k5 R! j
  4. Dim Domain,GFilePath ( \# C* e5 l0 Q8 O) e3 {8 m
  5. Domain = Request.ServerVariables("SERVER_NAME") & k) Z1 W: y' l5 |$ k
  6. GFilePath = Request.ServerVariables("PATH_INFO")
    / N# {, x" D3 H% o  k! g4 j
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/"))) ' h* Z0 @# m" m8 e
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; # [5 s' ]- c2 W
  9. End Function ; p# w4 c7 `! b7 ~1 v+ F
  10. Function ShowFileList(folderspec) + u& T6 q* ]  _9 b3 z5 [7 Y
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
    . Z# a4 y+ d7 d( E
  12. Path = Server.MapPath(folderspec)
    ( r6 h9 t5 G7 E
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    & m+ B+ g$ c  s. G. j
  14. If objFSO.FolderExists(Path) Then : F: y! P0 i) K" [3 J
  15. Set objFolder = objFSO.GetFolder(Path)
    0 Q6 Y/ |; @' W/ m7 r4 Q
  16. count = 0 ! R9 S1 z) @  {! C" @
  17. For Each objFile in objFolder.Files
      L& h" s/ c% a
  18. count = count+1
      E. [$ }/ c0 v! S0 _
  19. Next . e5 o$ E: x; I7 `1 k  d  w
  20. randomize
    / b1 c. C5 x: V5 C3 Y0 e
  21. nume = Int((count*rnd)+1)
    3 h* O) Y. M9 o9 |' X# O! h2 e5 y
  22. S = 0 ( Q- }0 u! d/ o! M& y* @1 Y
  23. ShowFileList = "" 3 r+ x& ?  V# i
  24. For Each objFile in objFolder.Files
    7 U$ d3 w" D  l
  25. S = S + 1 : Y; S8 t* ]6 G9 }
  26. If S = nume Then 7 q/ k$ P$ W- N% }. h. h$ z
  27. ShowFileList = objFile.Name - V; f/ {, b; m# v. a3 S  m
  28. Exit For
    . E% h- s. r0 s2 l( q. P/ Q: h3 M7 S
  29. End If
    " t: p) \( }  l; P" u8 P
  30. Next
    0 I( t! o: R5 ^; s# x
  31. Set objFolder = Nothing / ^. }  m; ~, s; H3 k% x9 X
  32. Else
      x: @3 A" N3 r4 C3 Q0 c$ b
  33. ShowFileList = "NO"
    # v9 T4 ]( [+ k- p  ?
  34. End If
    2 x. J( _! [  J$ T* n1 J9 ~4 J
  35. Set objFSO = Nothing & G$ q3 X& S* K( ~/ q
  36. End Function
    % a  v4 @+ B: y$ r* t
  37. Dim list,filename,address,str
    9 ^6 Y& O+ g; _
  38. list = trim(Request.QueryString("list")) 0 G: l0 c! m% ]! }- L, D
  39. if list = "" then
    " ?$ G2 c  Y1 ^+ J
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg" ' j) f' Y2 z3 B$ Y! W  T
  41. Response.End()
    . f, K+ ~, l1 A! y6 G
  42. end if 3 {' n% J" v; k& O* q7 @1 J. o
  43. filename = ShowFileList("./"&list&"/") $ I1 b$ z& V$ n3 l2 g8 Q; N7 i
  44. if filename = "NO" then
    & ]4 X1 G! A2 k. s
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!" , z4 X! P" m# n5 R
  46. Response.End()
    ' E4 p  k! b2 i% z, K8 K
  47. end if
    : B. h8 L+ Z" [9 X
  48. if filename = "" then * c4 T, m# W* g) i) r3 e3 }
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" 9 ^8 `$ {0 k7 P: m
  50. Response.End() 2 S5 F9 S, h9 y; A  {7 k
  51. end if
    ' n& U- C( M  Z4 G) Q& W) O: K
  52. str = right(filename,3) : C$ g3 U# |2 V8 X3 K2 x! @1 o
  53. if str<>"jpg" and str<>"gif" then 7 B( I8 y3 q- M" O5 h& J* g6 ~
  54. filename = "erro.gif"
    2 E! [# F5 d2 X; E
  55. end if * J9 Q( Q5 T- j
  56. address = AllPath&list&"/"
    , g+ ]6 P0 y/ }. N+ O2 y5 W
  57. address = address&filename ( `. T, S  e- J# \6 p8 H# U
  58. %>
    + @3 M8 m) f, \+ y  l6 L
  59. <%Response.redirect(address)%>
    0 Q* G! _' j. `, w' P( e
  60. 把這段代碼保存為im.asp' b, p  G' A# S. p( w# w  r: u
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼
0 M  m$ ~2 P+ k$ E% ?* L9 n# ?% L
[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

發表於 2007-7-30 13:07:24 | 顯示全部樓層
看看
回復 给力 爆菊

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 免费注册

本版積分規則

过期高净值品牌域名预定抢注

點基跨境 數位編輯創業論壇

GMT+8, 2025-5-6 17:31

By DZ X3.5

小黑屋

快速回復 返回頂部 返回列表