过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> . y6 [' ~5 I7 z' V! ?
  2. <%
    ' m* c& }$ S9 x! w4 \' Y
  3. Function AllPath() 3 f1 U! N6 A5 d
  4. Dim Domain,GFilePath
    ( X# A, Y4 U; T/ e
  5. Domain = Request.ServerVariables("SERVER_NAME")
    / r9 s0 H) {/ D& X% N4 g
  6. GFilePath = Request.ServerVariables("PATH_INFO")
    + x: M, U2 x2 D- }; n
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/"))) 6 o0 \( G9 D3 E! q( p: x
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; ( J7 n* a9 f; l3 ^; `, D
  9. End Function
    8 o6 T5 F; I  I6 v# N: y$ ?, `9 O+ X; ^
  10. Function ShowFileList(folderspec)
    3 f6 l% |7 e  w5 D( ~
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
    . c' I1 J7 \8 K6 f) Y$ Y  U4 P( Y
  12. Path = Server.MapPath(folderspec)
    % C  b% M: Y% h' e9 r2 U; l
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    2 h6 D9 \  w/ ^( v' \" @" n
  14. If objFSO.FolderExists(Path) Then   z/ n/ C: s$ H! {) Y
  15. Set objFolder = objFSO.GetFolder(Path)
    6 J6 N' G. a7 H
  16. count = 0 : Q7 Z1 Z& G# C* e, x
  17. For Each objFile in objFolder.Files
    1 c' D6 f1 N+ D; ]1 d+ A# S' \' }# z
  18. count = count+1   _* L3 s" j  E% K& A* l: o, q3 `
  19. Next ; L9 y5 q% M: _6 I9 q) U9 ^
  20. randomize 0 |" {+ v) B! b3 M6 U1 F; ?
  21. nume = Int((count*rnd)+1)
    ) p5 K/ ~" G+ g6 W
  22. S = 0
    2 s4 w7 Y# h1 {
  23. ShowFileList = ""
    5 c' t, P# j% w
  24. For Each objFile in objFolder.Files % T1 |5 W4 i; o( b) l# L
  25. S = S + 1
    : k5 i! z2 f. L8 M/ F9 S
  26. If S = nume Then
    2 N: p  @5 {# w8 i% r
  27. ShowFileList = objFile.Name
    7 b8 Y- p5 A% A7 W, d
  28. Exit For 3 \- e1 o5 U" ^0 Z, v
  29. End If 3 B5 V4 b# ^7 C
  30. Next 3 O6 u" L6 y# F/ }" n2 n; }
  31. Set objFolder = Nothing
    6 Q* z. M) w# _3 {8 [% b+ w- |
  32. Else 1 y% z( H5 t1 P  l* r& U
  33. ShowFileList = "NO" + w( B; ?) o! F9 c3 T/ g! b; h
  34. End If % ]3 B. N# ~  m$ P# B
  35. Set objFSO = Nothing
    " w1 K$ ]+ _0 U
  36. End Function / E7 x: [& U0 C  M5 X$ o% k8 U
  37. Dim list,filename,address,str " D1 ]" _; y1 g
  38. list = trim(Request.QueryString("list")) . P! V1 v* e  m; ^% F. ~; |
  39. if list = "" then 3 }1 d3 H. F# t
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg" + X( U6 i; C# W+ i1 s" P+ B
  41. Response.End() / ?. l5 n2 @/ D) f- i
  42. end if
    $ E: y8 D/ ?& d( H
  43. filename = ShowFileList("./"&list&"/") : W5 W! p  C4 S1 \
  44. if filename = "NO" then
    3 |. P  h! s. \# f0 \, u2 R" T% A9 ?
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!"
    $ V5 a; G/ Z8 F: ~+ @, @9 j% M
  46. Response.End()
    , |; V$ r7 L. s  [( t, m2 b
  47. end if
    2 V* B/ }& v' O0 w0 P3 ]2 K
  48. if filename = "" then
    . e" e/ T$ c  z0 b5 J: s
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" + h6 j3 P2 }' P7 |/ C/ ]
  50. Response.End() * P& m# J7 B+ z2 ]( @) B
  51. end if 2 n" @3 i0 G, y( ?/ t/ `( X  v* x
  52. str = right(filename,3)
    + h; ?& k1 M& N9 ^
  53. if str<>"jpg" and str<>"gif" then
    % \$ Q' o* O; [
  54. filename = "erro.gif" ; @" b3 @0 {6 ^
  55. end if - |4 x6 N7 {1 g  Y! c2 ]
  56. address = AllPath&list&"/" 1 M  Z9 Y0 u8 ]+ N9 T1 @8 B
  57. address = address&filename
    7 ?, w! N; l; V" ]) H' H
  58. %>
    # `% R1 X6 L! M' x5 t( ~
  59. <%Response.redirect(address)%> / E% ~- a8 v* N$ M' W3 h( n
  60. 把這段代碼保存為im.asp
    5 Y2 Y- Z# t5 V% a$ \5 Z4 G
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼
6 B) N, }! C4 m7 l
[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

點基

GMT+8, 2026-6-4 18:10

By DZ X3.5

小黑屋

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