过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> ' i' f$ D- o- s% Z* |- N
  2. <% 2 K, V. n0 X1 U2 ?" y: N
  3. Function AllPath()
    & [/ |* c' |0 ]' S0 Y  q3 [
  4. Dim Domain,GFilePath 9 P, c0 o4 [( o# m/ |! L
  5. Domain = Request.ServerVariables("SERVER_NAME")
    * `  o' N9 Y6 T; L) b
  6. GFilePath = Request.ServerVariables("PATH_INFO") . ?1 i; L  k8 z, x: S! H
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
    / Q- u/ E3 F3 |' K  ?4 Q
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ; ! z4 h% Z) r/ D, X9 F  Y
  9. End Function
    2 a: u! a: N( l& w
  10. Function ShowFileList(folderspec) . U' O1 X/ b0 }$ \! p9 v- W2 f
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
    6 i- t0 y& ]( G: ~
  12. Path = Server.MapPath(folderspec)
    * F+ w: p9 U9 z7 e
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject") * h) s- ~4 j0 h& v5 ^
  14. If objFSO.FolderExists(Path) Then
    + Y3 r# v! Z: u! ?6 G
  15. Set objFolder = objFSO.GetFolder(Path) 7 T. D' @2 v& p7 _% ~
  16. count = 0 1 u3 n3 A* p2 C/ H
  17. For Each objFile in objFolder.Files 6 ]/ e4 `& p  }# h$ J5 \: ^
  18. count = count+1 , k2 b) G8 T: m. U, _. M3 L6 r
  19. Next
    + ^9 _% y4 V8 a* ?% w
  20. randomize " h% M# i: m4 ~( Y* D; _. ]$ e
  21. nume = Int((count*rnd)+1) $ S) t. b% h( I" w% t( @$ V) w
  22. S = 0
    4 j6 _" a3 H: C7 k+ L9 V
  23. ShowFileList = ""
    ( w5 u/ N8 x5 F0 V, W7 I
  24. For Each objFile in objFolder.Files
    9 q: A: h" j. p7 O9 E
  25. S = S + 1 ; }. P5 c* w5 V  g& Z) H
  26. If S = nume Then * U9 i: }  e  J. Z6 s/ t
  27. ShowFileList = objFile.Name
    " p0 ^+ G: `3 T
  28. Exit For
    2 d* A+ `; [) n% I
  29. End If 2 J4 @4 A/ \6 x. j: m& M
  30. Next * D( X: b: d- W, T
  31. Set objFolder = Nothing ) H' b  q4 o: Y7 x: |  r% g8 A' x3 }
  32. Else ( A( m2 [' ~" `, [
  33. ShowFileList = "NO"
    % e" P& \0 w4 d6 x# `8 X
  34. End If
    ; y  i/ U: h/ F! a  t
  35. Set objFSO = Nothing
    + g5 [( J8 @% O9 D% T; }& v2 {& \
  36. End Function 8 _9 W' [5 c5 q7 E
  37. Dim list,filename,address,str
    : I1 m- L0 x& J1 K( F' ]( [& H
  38. list = trim(Request.QueryString("list")) 2 D6 I" \2 ^  R- _
  39. if list = "" then
    3 {- \  i! g/ g) G& o6 A
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg"
      A3 T% a8 x! i) Y3 Q
  41. Response.End() 1 l/ N0 U; [$ _; q
  42. end if ' n; _0 [; ^& L1 \- A" e
  43. filename = ShowFileList("./"&list&"/")
    1 O% e% G1 \7 o, H2 i, J. @0 _; g. y
  44. if filename = "NO" then 0 S+ @" ~2 |2 w5 ]$ g
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!" " y$ @" U3 N/ T5 C+ K
  46. Response.End() # F- G1 ?- c3 p# s- S4 f
  47. end if
    * N2 T, f5 O- a  Q9 Y' n+ x8 q2 X
  48. if filename = "" then 8 X+ v+ h! j- v
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" . M2 ~  d+ A. p7 Y5 T2 i
  50. Response.End()
    5 ?% ?* b# N, t5 K# x% a' q
  51. end if # v' t* e0 b% P& Q
  52. str = right(filename,3)
    5 N# \6 S  h, C; R' c
  53. if str<>"jpg" and str<>"gif" then : w7 a+ I  M$ U) o  v6 _8 q9 Z
  54. filename = "erro.gif"
    ; F3 b6 E* z) T# Q, s8 \
  55. end if
    ) L# g- @- W% ?6 [- \* t" Q3 X
  56. address = AllPath&list&"/"
    + t- F3 V0 j8 m( T
  57. address = address&filename
    6 o; E9 {8 x: l- v% u
  58. %> * L4 t' D  B9 L, b
  59. <%Response.redirect(address)%>
    0 i# a4 c. d) {3 L# P
  60. 把這段代碼保存為im.asp3 g1 M; O2 V) ]' w3 n8 c2 E
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼
$ v" z! m- I6 h
[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

點基

GMT+8, 2025-11-22 13:08

By DZ X3.5

小黑屋

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