过期域名预定抢注

 找回密碼
 免费注册

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

[複製鏈接]
發表於 2007-6-3 16:44:33 | 顯示全部樓層 |閱讀模式
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
    5 I0 H: X* G  U
  2. <% . _  }9 K8 }/ M/ Y/ x; t4 O2 f7 e
  3. Function AllPath()
    ) s* N* c5 t: ]
  4. Dim Domain,GFilePath
    & H4 i+ `6 [$ _- x: G. P0 {
  5. Domain = Request.ServerVariables("SERVER_NAME") % p" g! N8 ^& a9 Y6 N  B; R
  6. GFilePath = Request.ServerVariables("PATH_INFO")   P) T! U+ A! m! V
  7. GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
    " ^+ N/ _7 Z  q8 t5 n
  8. AllPath = "http://www.w16888.com/" //唯一需要修改的地方,你的圖片目錄如果是在http://xxxx/myfile/angie/pic,這裡就寫http://xxx.com/myfile/angie/ ;
    ; }' }; z  [8 Q5 s1 Y: {0 @( Z
  9. End Function ' M$ u# o2 ?5 u& f4 A6 `! ]
  10. Function ShowFileList(folderspec)
    2 |" n1 c6 y. G: h
  11. Dim Path,objFSO,objFolder,count,objFile,nume,S
    ' e$ V0 ?- A) b# p) w) Q4 J- {, Y
  12. Path = Server.MapPath(folderspec)
    : e+ j6 v: K+ F5 x
  13. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    3 O/ r4 }7 I* T/ a/ c
  14. If objFSO.FolderExists(Path) Then ' _8 s# c3 c. C2 R, y5 W
  15. Set objFolder = objFSO.GetFolder(Path)
    # S( G0 w# H1 Y( T
  16. count = 0 6 H8 Z. ~0 o+ L+ U
  17. For Each objFile in objFolder.Files
    ) `8 p; Y# u- n: j
  18. count = count+1
    * C) c0 o! E3 S0 S& w
  19. Next 6 l* S/ c7 M+ c) T2 r0 j* w: s3 [$ ~7 A
  20. randomize
    3 @- F7 y, _* @
  21. nume = Int((count*rnd)+1) 9 U/ J" T. I8 K
  22. S = 0 * U& n1 G! w7 _9 V5 S% }' f3 s- w7 e
  23. ShowFileList = "" ( Q  p  g4 E+ `
  24. For Each objFile in objFolder.Files 2 y& z% E4 y7 w7 M2 g; [
  25. S = S + 1
    + M. f7 W6 V' k  x9 @/ H
  26. If S = nume Then
    . s- G; k% r2 Q( N
  27. ShowFileList = objFile.Name
    + t/ }  R! e2 D( d9 s- j( A& I
  28. Exit For 9 d& I: b/ g' r6 j
  29. End If 6 n* B; H4 ?+ H3 d1 _/ ^
  30. Next
    ; P8 l: y+ I4 {6 q0 ^# {
  31. Set objFolder = Nothing
    : H) R$ }9 c3 O
  32. Else
    1 J$ F: P& ~# M( I  u, V$ }
  33. ShowFileList = "NO" & i9 @; o/ S: I) W
  34. End If
    / u6 K5 N5 ]6 E4 a% [. M
  35. Set objFSO = Nothing , h$ v5 z! z& W* P/ m, C
  36. End Function 3 c( s+ _$ ^, w" B! O" A2 G3 `8 s
  37. Dim list,filename,address,str
    7 A& Z0 [/ w1 |6 k
  38. list = trim(Request.QueryString("list")) 0 U! b& N: v5 U
  39. if list = "" then
    : Q8 P) W! X) V2 O6 e0 n
  40. Response.write "本頁需要正確參數引入,您缺少相關的參數!正確格式如下:"&AllPath&"xxxxxx.asp?list=xxxxxx.jpg"
    / I, [0 A- B- J* n
  41. Response.End() % t; p: F9 T9 Z% s! a2 ~
  42. end if ( h" c7 ?$ u& U5 [
  43. filename = ShowFileList("./"&list&"/") % O; s* t: @) t) E" U4 n
  44. if filename = "NO" then ) l# z7 a  G2 N2 `' e' [( n2 q
  45. Response.write "您指定的目錄<b>"&list&"</b>不存在,請重新指定!" . w: j$ b$ Z3 d: o
  46. Response.End() , Z& c* [0 w5 j! r! E- D4 i
  47. end if
    ' c# @; R: x2 d7 q# i7 h
  48. if filename = "" then
    5 H2 i6 M6 H2 x, M" w
  49. Response.write "您指定的目錄<b>"&list&"</b>沒有相關的圖片文件存在,請重新指定!" % {  N% b, @. `) |9 g
  50. Response.End()
    $ E; N, ~% p0 k8 A5 d& ?! @0 f
  51. end if . }) b: V' X* ]. ~) p( \& u
  52. str = right(filename,3) % K2 N3 g9 m$ @; p
  53. if str<>"jpg" and str<>"gif" then
    5 a& h$ ~& M, B8 z" j; M% u
  54. filename = "erro.gif" " V1 a4 M9 J, k& Z: u
  55. end if
    ( t& u2 S4 [5 D. H7 H3 E; V( i/ G  W2 q
  56. address = AllPath&list&"/" - i3 {; d* V# R0 O- Y, @' q
  57. address = address&filename
    ) V5 x- P! _! L4 J+ f8 a
  58. %>
    % }4 b" V( d9 G9 d6 Y, ]5 t
  59. <%Response.redirect(address)%>
    5 ~7 l3 e) ]% \' k: V
  60. 把這段代碼保存為im.asp
    * a) F, G. x2 J; m4 a- {
  61. 把美女圖片放在pic文件夾下,把pic文件夾和im.asp放在網站根目錄下,在瀏覽器裡打開演
複製代碼

, O; i% n0 r& t3 a[ 本帖最後由 tcbxh2008 於 2007-6-3 16:47 編輯 ]
發表於 2007-6-9 21:55:56 | 顯示全部樓層
呵呵,這個玩過的哦,不錯的`
回復 给力 爆菊

使用道具 舉報

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

使用道具 舉報

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

本版積分規則

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

GMT+8, 2025-7-2 07:47

By DZ X3.5

小黑屋

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