过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    & z: E- C3 `; C" M* p( C/ D$ r
  2. <% 4 a( z. V9 Y# s9 Q
  3. Function AllPath()
    ! N8 d' A2 F/ {2 w6 m
  4. Dim Domain,GFilePath
    $ v2 N" I" w# t* j' d; b
  5. Domain = Request.ServerVariables("SERVER_NAME") $ Y; m# k) ^) d/ \8 j: g9 C/ }
  6. GFilePath = Request.ServerVariables("PATH_INFO") 3 R' `' b: \. _4 }. ?" U. _
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
    , ~  b3 Q) M5 h3 f/ O( R  W
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; 2 `  X7 w& |/ t0 }/ X
  9. End Function
    1 j7 U4 |, C. w7 R: N
  10. Function ShowFileList(folderspec)
    # O$ k( \+ L# `+ `, M, q: ~
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S 8 S! ]; z: n; _7 X  P
  12. Path = Server.MapPath(folderspec) " _, v! Y  j  F" W( ~* {0 R
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    4 a+ D/ v8 }* t' K  X9 Z
  14. If objFSO.FolderExists(Path) Then 9 C' x& o3 u1 ?! d6 N
  15. Set objFolder = objFSO.GetFolder(Path) " _- I! P4 f0 S, ^0 I, S
  16. count = 0 5 e3 H9 J  Q9 q' P4 v- q/ U
  17. For Each objFile in objFolder.Files 2 A3 w/ k7 m& V' F& s" J/ t' s
  18. count = count+1
    " D- i- q$ V! [& I' k6 Q* x. ], Y
  19. Next 1 t  t. e% d3 o5 J  l$ Z
  20. randomize + [$ @" `( l; Q! d( e1 c
  21. nume = Int((count*rnd)+1) 3 P6 K, z$ C5 f8 o. Y. Z
  22. S = 0
    ' l0 A4 @. n: V4 X) z* ?
  23. ShowFileList = ""
    4 K6 ~+ x; T/ k7 ?3 E
  24. For Each objFile in objFolder.Files
    6 P4 [# E- R  P: o4 l
  25. S = S + 1 * d7 \/ H4 o$ t! B* C: t4 W
  26. If S = nume Then ( \# C8 p7 y" z: c( a
  27. ShowFileList = objFile.Name ! H+ z6 r' L5 ]/ F; H
  28. Exit For ) [1 J, H7 ~7 s
  29. End If
    1 w1 n# M  a$ C6 V3 O6 F
  30. Next ) g* W7 M3 U6 H5 C" H8 U
  31. Set objFolder = Nothing
    + q8 q( I% J5 b% h4 |7 d1 D. Q& k
  32. Else 3 u/ }1 k( O2 I, H8 J
  33. ShowFileList = "NO" 1 A3 i  s6 t- C+ x( S
  34. End If & L: ~2 X# [* D3 {1 L
  35. Set objFSO = Nothing
    & j  @. A, K# n/ Y
  36. End Function
    ' I8 @3 G- g. f* @
  37. Dim list,filename,address,str
    " p; l, d1 Q6 f6 [
  38. list = trim(Request.QueryString("list")) $ @) ~  v1 D: S5 L5 ^3 P
  39. if list = "" then / R) T) t, S+ ~
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg" / a8 _; J4 k1 P
  41. Response.End() ' c6 {+ [4 W" _8 X
  42. end if
    - G2 [4 S$ B! t
  43. filename = ShowFileList("./"&list&"/")
    6 x1 y& {: |" J  B
  44. if filename = "NO" then % I9 j, B/ k* s# M
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!"
    ) \9 c5 H( `* {- w
  46. Response.End()
    / ~+ E  ?: L1 S8 B: Y- X6 S/ _
  47. end if
    ' q3 L; l" D# p2 g' I
  48. if filename = "" then
    * s* f8 P1 H) U6 I3 o& E' j% L
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" 8 E* d1 K9 Y8 H5 k; d6 v
  50. Response.End()   V. L! N0 b/ ^# R& Z, t! G
  51. end if
    % A+ w+ `  h9 K$ M
  52. str = right(filename,3) % L/ u' ?. c6 D( a4 }
  53. if str<>"jpg" and str<>"gif" then
    / N  G: H1 B7 g. H& t
  54. filename = "erro.gif"
    ) K" }' T6 J+ y& r. N
  55. end if
    * r* [) p* n- M& i2 c
  56. address = AllPath&list&"/" - `& d+ n# M4 U0 B/ K% _; b0 o/ [! X
  57. address = address&filename
    1 Q8 u7 g* V( p2 C8 R
  58. %> # b' D% @, |+ q5 e' }
  59. <%Response.redirect(address)%>
    3 i" h& j0 ?' W2 V" ]& b( z
  60. 把這段代碼保存為im.asp) Y6 ^$ ]+ \# ^
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼
1 m: K8 \# V& g; ^6 ~' P1 l% q0 M
[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

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

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

By DZ X3.5

小黑屋

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