|
|
Ŭ¶ó¿ìµåű×
Javascript PHP asp CSS html mysql jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
|
ÈǸ¢ Ä«¿îÅÍ ·Î±×ºÐ¼®±â |
|
|
|
|
¼Ò½ººÐ·ù |
·Î±×ºÐ¼®±â |
|
|
´Ù¿î·Îµå Ƚ¼ö |
2513 ȸ |
|
|
|
°£´Ü¼³¸í |
ÈǸ¢Ä«¿îÅÍ´Â ±âº»ÀûÀ¸·Î Ä«¿îÆÃ(Á¢¼ÓÀÚ¼ö °è»ê) ÇÏ´Â ÇÁ·Î±×·¥ÀÔ´Ï´Ù. ±âº»ÀûÀÎ ±â´ÉÀº Á¢¼ÓÀÚ¼ö(ÃÑ°è, ¾îÁ¦, ¿À´Ã, ÇöÀç)¸¦ °è»êÇϸç, º°µµÀÇ ÇÁ·Î±×·¥À¸·Î Åë°èÄ¡¸¦ ³»´Â ±â´ÉÀ» °¡Áö°í ÀÖ½À´Ï´Ù.
ÀϺ°, ¿ùº°, ³âº°, ±âŸ Åë°èÄ¡¸¦ ¸¸µé¾î º¸¿©ÁÖ¸ç °¢°¢ÀÇ ºê¶ó¿ìÁ®/¿î¿µÃ¼Á¦/½Ã°£º° ºÐ¼®À» Á¦°øÇÕ´Ï´Ù. |
|
|
|
|
|
::::::: ÈǸ¢ Ä«¿îÅÍ(ver 1.0) ::::::::
¿¹¸¦ º¸½Ã·Á¸é http://hulryung.com/stat/stat.asp ÀÌ°÷À» Âü°í ÇÏ½Ã±æ ¹Ù¶ø´Ï´Ù.
::::::: ¾µµ¥¾ø´Â ¸».. ::::::::
ASP¸¦ ÇÒ ÁÙ ¾È´Ù! °í ÇϽô ºÐµéÁß¿¡ Ä«¿îÆà ÇÁ·Î±×·¥ ÇÑ°³Âë ¾È¸¸µé¾î º¸½ÅºÐÀÌ ¾øÀ»ÁÙ
¾Ð´Ï´Ù. ±×¸¸Å ±âº»ÀûÀÌ°í ¶Ç ½±°í ¿©·¯°¡Áö ¹æ¹ýÀÌ ÀÖ´Â ÇÁ·Î±×·¥ÀÌÁö¿ä. FSO¸¦ ÀÌ¿ëÇϰųª
DB¸¦ ÀÌ¿ëÇϰųª.. ±×¸®°í ÀÚ½ÅÀÇ À¥ÆäÀÌÁö¿¡ ÃÑ ¹æ¹®ÀÚ¼ö, ¾îÁ¦,¿À´Ã,Áö±Ý ¹æ¹®ÀÚ¼ö¸¦
±â·ÏÇϴ°͵µ Àç¹Õ±¸¿ä.. ±×·¡¼ Çѹø º¸±âÁÁ°Ô Åë°èµµ ³»°í À¥·Î±× ÆÄÀÏ ¾È °Çµå¸®°í »©³»¿Ã
¼ö ÀÖÀ»¸¸Å(´Ù~´Â ¾Æ´ÏÁÒ? ^^) »©³»¿Í¼ Çѹø ½áº¸ÀÚ.. ´Â »ý°¢¿¡ ¸¸µé¾î ºÃ½À´Ï´Ù.
::::::: ¼³Ä¡ ::::::::
»ý°¢º¸´Ù´Â °£´ÜÇÕ´Ï´Ù. ¸ÕÀú ¾ÐÃà ÆÄÀÏÀ» Ç®¾îº¸½Ã¸é ¾È¿¡ sqlÀ̶ó´Â È®ÀåÀÚ°¡ µé¾îÀÖ´Â ÆÄÀÏÀÌ
Àִµ¥ ±×°ÍÀ» Äõ¸® ¾Æ³¯¶óÀÌÁ®¿¡¼ ½ÇÇà½ÃÅ°½Ã¸é ÇØ´ç µðºñ¿¡ stat À̶ó´Â Å×À̺íÀÌ Çϳª »ý¼º
µË´Ï´Ù. ÀÌÁ¦ ±× Å×ÀÌºí¿¡ ¸ðµç µ¥ÀÌÅ͵éÀÌ µé¾î°¥ °Ì´Ï´Ù.
±×¸®°í À¥ ·çÆ® µð·ºÅ丮¿¡ º¸¸é global.asa¶ó´Â ÆÄÀÏÀÌ Àִµ¥ ÀÌ ºÎºÐÀ» ¼öÁ¤ÇÏ¼Å¾ß ÇÕ´Ï´Ù.
´ÙÀ½Àº Á¦°¡ ¾²°í ÀÖ´Â global.asaÆÄÀÏÀÔ´Ï´Ù.
<SCRIPT LANGUAGE="VBScript" RUNAT="Server"><br />
Sub Application_OnStart<br />
<br />
End Sub<br />
<br />
Sub Application_OnEnd<br />
<br />
End sub<br />
<br />
Sub Session_OnStart<br />
<br />
Application.Lock<br />
Application("nowCount") = Application("nowCount") + 1<br />
Application.UnLock<br />
<br />
`` ¿¬°á °´Ã¼ »ý¼º<br />
strConnect="Provider=sqloledb;Data Source=127.0.0.1;Initial Catalog=µðºñ¸í;User ID=¾ÆÀ̵ð;Password=Æнº¿öµå;" <br />
Set DbConn = Server.CreateObject("ADODB.Connection") <br />
DbConn.Open strConnect <br />
<br />
ip = request.ServerVariables("REMOTE_ADDR")<br />
user_agent = request.ServerVariables("HTTP_USER_AGENT")<br />
user_agent = replace(user_agent,"``","````")<br />
<br />
dim dim_user_agent<br />
dim_user_agent=split(user_agent,";")<br />
<br />
if Ubound(dim_user_agent)>1 then<br />
brow_user_agent=dim_user_agent(1)<br />
os_user_agent=dim_user_agent(2)<br />
os_user_agent=replace(os_user_agent,")","")<br />
else<br />
brow_user_agent=""<br />
os_user_agent=""<br />
end if<br />
<br />
referer = request.ServerVariables("HTTP_REFERER")<br />
<br />
sql = "insert into stat (stat_ip, stat_date, stat_user_agent, stat_referer, stat_browser, stat_os) values (``"&ip&"`` , getdate(), ``"&user_agent&"``,``"&referer&"``,``"&brow_user_agent&"``,``"&os_user_agent&"``)"<br />
DBConn.execute(sql)<br />
<br />
`` ÃÑ Á¢¼Ó Ä«¿îÆÃ<br />
sql="select max(stat_num) as total from stat"<br />
Set Rs=DBConn.execute(sql)<br />
<br />
i_total = Rs("total")<br />
<br />
`` ¾îÁ¦ Á¢¼Ó Ä«¿îÆÃ<br />
sql="select count(*) as yesterday from stat where datediff(dd,stat_date,getdate())=``1``"<br />
Set Rs=DBConn.execute(sql)<br />
<br />
i_yesterday=Rs("yesterday")<br />
<br />
`` ¿À´Ã Á¢¼Ó Ä«¿îÆÃ<br />
sql="select count(*) as today from stat where datediff(dd,stat_date,getdate())=``0``"<br />
Set Rs=DBConn.execute(sql)<br />
<br />
i_today=Rs("today")<br />
<br />
DBConn.close<br />
Set DBConn = nothing<br />
Set Rs = nothing<br />
<br />
Set fso = Server.CreateObject("Scripting.FileSystemObject")<br />
<br />
Set file=fso.createTextFile(Server.MapPath("/")&"/count.asp",true)<br />
<br />
file.writeline("<%")<br />
file.writeline(" `` ÀÌ ÆÄÀÏÀº Ä«¿îÅ͸¦ À§Çؼ ÇÊ¿äÇÑ ÆÄÀÏÀ̸ç ÀÚµ¿ÀûÀ¸·Î »ý¼ºµÇ´Â ÆÄÀÏÀÔ´Ï´Ù.")<br />
file.writeline(" `` from hulryung.com")<br />
file.writeline(" counter_total="&i_total&" `` ÃÑ Ä«¿îÆüö")<br />
file.writeline(" counter_yesterday="&i_yesterday&" `` ¾îÁ¦ÀÇ Ä«¿îÆà ¼ö")<br />
file.writeline(" counter_today="&i_today&" `` ¿À´Ã Ä«¿îÆà ¼ö")<br />
file.writeline(" counter_date="&chr(34)&now&chr(34)&" `` Ä«¿îÆÃÇÑ ¸¶Áö¸· ³¯Â¥¿Í ½Ã°¢")<br />
file.writeline(chr(37)&">")<br />
file.close<br />
<br />
End Sub<br />
<br />
Sub Session_OnEnd<br />
Application.Lock<br />
Application("nowCount") = Application("nowCount") - 1<br />
Application.UnLock<br />
End Sub<br />
<br />
</SCRIPT>
ÀÌ·¸°Ô ÀÌ·ç¾îÁ® ÀÖÀ¸¸ç ¿©±â±îÁö¸¸ ÇÏ½Ã¸é ±âº»ÀûÀÎ Ä«¿îÆÃÀÌ ½ÇÇàÀÌ µË´Ï´Ù. global.asa ÆÄÀÏÀÇ ¼öÁ¤ÈÄ¿¡´Â
¼¹ö¸¦ ¸®½ºÅ¸Æ® ÇØ ÁÖ¼¼¿ä. Àü ±×³É Çصµ µÇ´øµ¥ ¾ÈµÇ´Â ºÐÀÌ ÀÖÀ»Áö ¸ð¸£´Ï±ñ...
±×¸®°í statheader.aspÆÄÀÏ¿¡ º¸½Ã¸é µ¥ÀÌÅͺ£À̽º ¿¬°á ºÎºÐÀÌ Àִµ¥ ±× ºÎºÐ¿¡ µ¥ÀÌÅͺ£À̽º¸íÀ̶û
¾ÆÀ̵ð, Æнº¿öµå¸¦ ÀÔ·ÂÇؼ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
::::::: »ç¿ë¹ý ::::::::
¸ÕÀú À¥ÆäÀÌÁö¿¡ ÇöÀçÀÇ Á¢¼ÓÀÚ¼ö¿Í Àüü Á¢¼ÓÀÚ¼ö µîÀ» Ç¥½ÃÇÏ°í ½Í´Ù¸é count.asp ÆÄÀÏÀ» include ½ÃÄѼ
»ç¿ëÇÏ½Ã¸é µË´Ï´Ù. °¢°¢ÀÇ º¯¼ö´Â ´ÙÀ½°ú °°½À´Ï´Ù.
counter_total : ÃÑ Ä«¿îÆà ¼ö
counter_yesterday : ¾îÁ¦ Ä«¿îÆà ¼ö
counter_today : ¿À´Ã Ä«¿îÆà ¼ö
counter_date : ¸¶Áö¸· Á¢¼Ó ½Ã°£
application("nowCount") : ÇöÀç Á¢¼ÓÀÚ ¼ö
°¢Á¾ Åë°èÄ¡¸¦ º¸°í ½ÍÀ¸½Ã´Ù¸é ¾ÐÃàÀ» Ç®¾î³õÀº µð·ºÅ丮ÀÇ stat.aspÆÄÀϸ¸ ºê¶ó¿ìÀú »ó¿¡¼ ¶ç¿ö Áֽøé
µË´Ï´Ù.
::::::: ÀúÀÛ±Ç ::::::::
ÀúÀÛ±ÇÀº ÈǸ¢Çѳ༮(hulryung@hulryung.com)¿¡°Ô ÀÖÀ¸¸ç »ç¿ë»óÀÇ Á¦¾àÀº ¾ø½À´Ï´Ù.
°³ÀÎÀû, Å×½ºÆ®, °ø°ø±â°ü, »ó¾÷Àû ¸ñÀûÀÇ »ç¿ë¿¡µµ ÀüÇô Á¦¾àÀÌ ¾ø½À´Ï´Ù.
¼Ò½º¸¦ ¼öÁ¤ÇÏ¿© »ç¿ëµµ °¡´ÉÇÕ´Ï´Ù. ´Ù¸¸ ¼Ò½º ¼öÁ¤ ÈÄ Àç ¹èÆ÷´Â ÀúÀÛ±ÇÀÚ¿ÍÀÇ ÇùÀǸ¦ ÀüÁ¦·Î ÇÕ´Ï´Ù.
´õºÒ¾î ¸ÞÀÎ ÇÏ´ÜÀÇ ÁÖ¼Ò ¸µÅ©ºÎºÐÀ» »èÁ¦ÇÏ½Ã¸é ¾ÈµË´Ï´Ù. ^^;
::::::: ¹ö±×°¡ ¹ß°ßµÇ¸é ::::::::
ÁÖÀú ¸¶½Ã°í Áï½Ã À̸ÞÀÏ(hulryung@hulryung.com)À̳ª ȨÆäÀÌÁö(http://hulryung.com)·Î ¾Ë·ÁÁÖ½Ã±æ ¹Ù¶ø´Ï´Ù.
::::::: ±Ã±ÝÇÑ »çÇ×ÀÌ ÀÖ´Ù¸é ::::::::
¿ª½Ã ÁÖÀú¾Ê°í À̸áÀ» º¸³»½Ã¸é ´ä ¾ÈÇص帳´Ï´Ù. -_-; ȨÆäÀÌÁö¸¦ ¹æ¹®Çؼ Áú¹®ÇØ ÁֽʽÿÀ.
::::::: Ã¥ÀÓÇÑ°è ::::::::
ÀÌ ÇÁ·Î±×·¥À» ½á¼ »ý±â´Â °¢Á¾ Àç³(¸ð´ÏÅÍ°¡ »öÀÌ º¯ÁúµÇ¾ú´Ù°Å³ª, ȸ»ç ¸ÞÀÎ ¼¹ö°¡ ¹ÌÃƴٰųª, ±âŸ µîµî)¿¡
Àú´Â µ¶¸³ÀûÀ̸ç ÀüÇô Ã¥ÀÓ°¨À» ¾È´À³¥°ÍÀÔ´Ï´Ù ¤Ñ¤Ñ;
::::::: ¸¶Áö¸·À¸·Î ::::::::
ÇϷ縸¿¡ ¸¸µç ÇÁ·Î±×·¥ÀÔ´Ï´Ù. ¹ö±×? ÀÖÀ»Áöµµ ¸ð¸¨´Ï´Ù.. ²À ¸®Æ÷Æà ÇØÁÖ¼¼¿ä ^^;;
¸¸µå´Âµ¥ ÈûÀ»ÁØ.............. ¾Æ¹«µµ ¾Èµµ¿ÍÁᱸ³ª -_-;
°¨»çÇÕ´Ï´Ù (__)
|
|
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.) |
|