过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    - |2 ~3 R9 v. R. G4 t; `
  2. <%
    : I& h  h$ p2 @0 h! t
  3. Function AllPath()
    + J+ V; u3 z/ c& x2 _
  4. Dim Domain,GFilePath , |) J7 V) L- `1 E  g
  5. Domain = Request.ServerVariables("SERVER_NAME")   r& x3 _+ A) L2 F1 q
  6. GFilePath = Request.ServerVariables("PATH_INFO") + k: X- x7 Q. r
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/"))) ( `; e7 O$ L8 }% w
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; / T! ^1 v. l3 _* P. i. P2 }! \
  9. End Function 7 X, Z/ t2 A7 X4 @
  10. Function ShowFileList(folderspec) - z# O+ [  H+ h( c' i; D3 S
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S 1 \3 g: ?  L: x+ P, e' a* @
  12. Path = Server.MapPath(folderspec) 7 k7 y# R0 g$ S% b
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject") ! u3 h6 h: L0 m  n  O7 r+ x/ J
  14. If objFSO.FolderExists(Path) Then
    6 A# o6 f# [: l8 d% [4 T
  15. Set objFolder = objFSO.GetFolder(Path)
    " _8 e2 v" n  _2 I  H* T: M$ Q" |
  16. count = 0 " z/ C% d7 d/ L; r/ @: X
  17. For Each objFile in objFolder.Files + E6 @* F0 H2 u7 O5 G. y1 L
  18. count = count+1
    2 U0 @  u8 q0 g4 v" z
  19. Next
    3 @0 T: J0 S2 W+ Q7 g% ]4 i
  20. randomize
    3 N+ e4 c8 Y. Z% \% E: \6 [( [
  21. nume = Int((count*rnd)+1) ) c. ?2 W6 U. |6 q! H
  22. S = 0
    & r  u8 d0 ^5 e
  23. ShowFileList = "" / a5 C* R& a( v6 d$ P
  24. For Each objFile in objFolder.Files 1 b  [2 @% b9 D# P2 D! ]
  25. S = S + 1 / H; z( e4 S6 {* t' |( D
  26. If S = nume Then . p7 Y8 l- x% W% w( U) P" I" T
  27. ShowFileList = objFile.Name
    3 e: m7 t( i' `- {  _8 o
  28. Exit For 0 f7 c+ f* @: D! q
  29. End If : [# K' d4 S2 d& l6 Z
  30. Next % @% c0 F2 m2 Z' B8 [; T7 f
  31. Set objFolder = Nothing 4 W/ t, V& X" K
  32. Else 5 P' q2 I; \8 t8 e
  33. ShowFileList = "NO"
    6 K! y/ q$ d9 U. G( T& L+ s* Q
  34. End If
    5 Z4 B$ x9 _, a& y, N# c
  35. Set objFSO = Nothing * J) s& C' r2 p+ b  _+ t) N& O
  36. End Function * s, }, m5 Z) ~( @6 {
  37. Dim list,filename,address,str % T7 C, A. ]1 j" ]
  38. list = trim(Request.QueryString("list"))
    + ]4 w+ O9 P9 c* X
  39. if list = "" then
    * i' F- |2 M+ G) H( T
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg" 1 c# a% T8 U* N& Y% x
  41. Response.End() 0 K  }" M/ a$ f4 g( j& I
  42. end if
      l: w2 s. q' L3 q' y9 X5 M
  43. filename = ShowFileList("./"&list&"/")
    4 [4 F) I1 q) Y2 |# k# x
  44. if filename = "NO" then
      N; x$ @" O2 k) a
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!"
    ( F& W+ @: s/ w; I
  46. Response.End() / q! y, A; o* d+ @! _& r. X. O
  47. end if 3 b2 N$ r# |8 q1 e
  48. if filename = "" then # O( O1 T' ?1 s: ?- ?
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!"
    2 @. a  c5 `" q! e2 _+ h3 s
  50. Response.End()
    " Q2 ~% Q# Z0 Q; t/ N/ ^# \+ W
  51. end if
    ) L' d! K+ o; h1 D
  52. str = right(filename,3) 1 Q, e( a+ b3 E5 `
  53. if str<>"jpg" and str<>"gif" then 0 X* i# r4 x) a+ M
  54. filename = "erro.gif"
    , [2 Z5 u) c  ]4 c5 w. p) B5 A
  55. end if
    . @6 N3 q0 ^1 N% Z% V& L
  56. address = AllPath&list&"/"
    # `% f- D2 w3 t
  57. address = address&filename
    ! o: I* S- g- p0 j
  58. %> 2 D3 l4 U  \. U% r8 m2 a8 k1 @
  59. <%Response.redirect(address)%> 8 U& ~' U3 @9 r# J
  60. 把這段代碼保存為im.asp! E9 \5 Y, s2 V1 g8 {. z/ t
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼
! \  ]1 U' ]" e
[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

GMT+8, 2025-7-13 16:19

By DZ X3.5

小黑屋

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