<html>
<body>
<%

  Dim linkSite(5)
  linkSite(1) = "http://www.naver.com"
  linkSite(2) = "http://www.daum.net"
  linkSite(3) = "http://www.empas.com"
  linkSite(4) = "http://www.yahoo.co.kr"
  linkSite(5) = "http://www.nate.com"


  randomize()
  r=Int((5 * Rnd) + 1) '1부터 5까지 난수값을 생성


  response.write "<a href='" & linkSite(r) & "' target=blank>웹마당(http://cafe.naver.com/webmadangnet.cafe)</a>"

%>
</body>
</html>

2008/02/21 15:08 2008/02/21 15:08

랜덤링크

프로그래밍/Asp 2008/02/21 15:07
<html>
<body>
<%
randomize()
r=rnd()
if r>0.5 then
  response.write("<a href='http://www.naver.com'>웹마당!</a>")
else
  response.write("<a href='http://www.yahoo.co.kr'>웹마당!</a>")
end if
%>
</body>
</html>
2008/02/21 15:07 2008/02/21 15:07

strReverse 함수를 이용한 문자열 거꾸로 뒤집기 입니다.


<html>
<body>
<%
strString = "안녕하세요!"
response.write(strReverse(strString))
%>
</body>
</html>

2008/02/21 15:07 2008/02/21 15:07

이번팁은 네이버 검색중에 필요하신 팁 같아서 퍼왔습니다.

유용하게 쓰세요!!


<%@ LANGUAGE="VBSCRIPT"%>
<%

    strIP = Request.ServerVariables("REMOTE_ADDR")
    strMac = GetMACAddress(strIP)
    strHost = Request.ServerVariables("REMOTE_HOST")

   

    function GetMACAddress(strIP)

   

    Set net = Server.CreateObject("wscript.network")
    Set sh = Server.CreateObject("wscript.shell")
    sh.run "%comspec% /c nbtstat -A " & strIP & " > c:\" & strIP & ".txt",0,true

    Set sh = nothing
   

    Set fso = createobject("scripting.filesystemobject")
    Set ts = fso.opentextfile("c:\" & strIP & ".txt")

    macaddress = null

   

    Do While Not ts.AtEndOfStream

      data = ucase(trim(ts.readline))
      if instr(data,"MAC ADDRESS") Then
      macaddress = trim(split(data,"=")(1))
      Exit Do
      End if

   loop

  

   ts.close

   Set ts = nothing

   fso.deletefile "c:\" & strIP & ".txt"
   Set fso = nothing

   GetMACAddress = macaddress

   End function


%>

<body>

<%Response.Write("Your IP is : " & strIP & "" & vbcrlf)%>
<%Response.Write("Your MAC is : " & strMac & vbcrlf)%>

</body>


2008/02/21 15:06 2008/02/21 15:06