过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> 7 c: V; r2 z% P
  2. <% : f$ ^- r: ^6 q* {3 D8 @- \& H
  3. Function AllPath() - |% J8 q$ n' Q
  4. Dim Domain,GFilePath ; o$ }. d/ u3 t( o+ u
  5. Domain = Request.ServerVariables("SERVER_NAME")
    : _, W$ w2 i) \8 y. g$ [+ R
  6. GFilePath = Request.ServerVariables("PATH_INFO") ; g% U+ D, [2 t/ s, P: U  R% a4 a7 D
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
    $ W6 n- H3 [( O5 G5 [, w/ x
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; 3 T% O/ W) g2 p: r& K  W# @4 [3 N3 J
  9. End Function
    " ^% Y4 }. j  t& D: D% F
  10. Function ShowFileList(folderspec) 5 }5 h+ e+ [+ }* D9 ?
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
    * T' U2 S- o( x: s6 f+ U- \* g
  12. Path = Server.MapPath(folderspec)
    1 u+ H3 T( l  P2 n8 y3 n) g6 N
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 3 C4 Y+ `' \3 t* i
  14. If objFSO.FolderExists(Path) Then
    4 B( C4 q2 k2 X) f
  15. Set objFolder = objFSO.GetFolder(Path) * w& ~' Q3 I3 D0 m7 a* U) m8 N
  16. count = 0 + c% L# p# A5 p7 X$ O& V
  17. For Each objFile in objFolder.Files + w& ^5 s" V( n# z# r0 m6 d+ d' x
  18. count = count+1
    , _5 u2 Q( H! z
  19. Next
    ; c0 L0 @, ~) M4 N& n
  20. randomize
      H+ i% X8 D* R/ s
  21. nume = Int((count*rnd)+1) 5 w2 w4 L$ d' M1 Y7 n& [- A
  22. S = 0
    , ?: O  T: _% _1 @
  23. ShowFileList = "" : ]8 {" S+ I2 `9 S. X
  24. For Each objFile in objFolder.Files
    * p1 x( y: r7 Z0 J: Z9 c# E* [
  25. S = S + 1 , q0 J. F8 l& I% K% C
  26. If S = nume Then ; N% y: p: Q4 f! C& D. k' Q
  27. ShowFileList = objFile.Name $ v% r3 g+ e' y5 o1 ^! z
  28. Exit For . G: k+ F0 j$ i; S/ I: ~% r
  29. End If
    3 B- r8 ~" N1 N$ p
  30. Next
    , F! Q; O& `7 [) \' ]* u8 r
  31. Set objFolder = Nothing + l6 v0 N( @! Y& s/ e1 V- y
  32. Else
    3 V2 P' @1 [- u
  33. ShowFileList = "NO"
    & m) B. k! Y5 Z- Y8 ~
  34. End If
    8 F! I; {, l6 D5 {- _- ?
  35. Set objFSO = Nothing / F, u+ h$ L; J; [- g" b
  36. End Function
    7 V& L7 ^+ F6 [
  37. Dim list,filename,address,str
    ' {& B) R4 D+ m4 J/ I+ j$ @
  38. list = trim(Request.QueryString("list"))
    # S- j- u7 Y: P+ ^  ?
  39. if list = "" then
    7 b6 e' c. C* K6 c* ]
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg" ; U( v  C! g( v, c% Y0 Z! Q  ?
  41. Response.End() * D1 c' c9 M# B# U: m# B8 m% n
  42. end if
    . x* B1 b$ ~9 n' N0 k: {
  43. filename = ShowFileList("./"&list&"/")
    # F: [, B+ e6 {' ~: C" ]) ?
  44. if filename = "NO" then * b" k* s; G' n+ S# H' N
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!"
    % O4 ~* e- n8 ^( s- h3 T& j& F- s
  46. Response.End()
    2 u# J* Y' i) ^8 t, R. f
  47. end if
    9 S$ G) d& e9 s3 d# P+ |7 i( ^+ m' h
  48. if filename = "" then " N/ T9 m& J( w. N  ~& P+ f
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" 1 F) n( E( C8 f; {  g3 p
  50. Response.End() $ r2 d* t; n* t8 _
  51. end if
    1 s) t6 s. o2 B9 {4 ?
  52. str = right(filename,3) 7 E% s! _* n  I% W% H" d* ]% c1 o
  53. if str<>"jpg" and str<>"gif" then
    $ \' P, p5 y% |6 F3 A+ L8 O6 e
  54. filename = "erro.gif" 2 E4 s# O% B- b+ G) n  W0 ~
  55. end if
    $ {; h' r# P. E
  56. address = AllPath&list&"/"
    " m7 @3 d% a) Y- b' Z9 b
  57. address = address&filename # }/ q" C& p# ~/ q. p+ T+ W
  58. %>
    ) V0 H+ u5 ^5 n, Z: |) }# ~% \
  59. <%Response.redirect(address)%> ( _; _% u5 M! \  H
  60. 把這段代碼保存為im.asp
    5 Z' \2 t6 F( e1 v% S3 R
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼

$ T: n: t; O! o5 T. J8 r6 F' B[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

點基

GMT+8, 2026-6-4 17:05

By DZ X3.5

小黑屋

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