Üye Kayıt Üye Giriş

Sayaç ve IP Logger


 Sayaç ve IP Logger


<%@
Language=VBScript
CodePage=1252
LCID=1055
%>
<%
'created by dreamcatcher
'apexcenter@msn.com
Response.Buffer=True
On Error Resume Next
dim objFSO,objMyFile,strMyIPFile,strCurrentIP,strImagesFolder,intCounter,strCounter,strMyIPs,k

strMyIPFile=Server.MapPath("count_log")
strImagesFolder="sayacgif"
strCurrentIP=Request.ServerVariables("REMOTE_ADDR")
ForReading=1
ForAppending=8

set objFSO=Server.CreateObject("Scripting.FileSystemObject")

if objFSO.FileExists(strMyIPFile) then
set objMyFile=objFSO.OpenTextFile(strMyIPFile,ForReading,1,0)
strMyIPs=objMyFile.ReadAll()
if InStr(1,strMyIPs,strCurrentIP)=0 then
set objMyFile=objFSO.OpenTextFile(strMyIPFile,ForAppending,1,0)
call objMyFile.WriteLine(strCurrentIP)
intCounter=objMyFile.Line-1
call objMyFile.Close
set objFSO=nothing
set objMyFile=nothing
else
intCounter=objMyFile.Line-1
call objMyFile.Close
set objFSO=nothing
set objMyFile=nothing
end if
else
set objMyFile=objFSO.CreateTextFile(strMyIPFile,0,0)
call objMyFile.WriteLine(strCurrentIP)
intCounter=objMyFile.Line-1
call objMyFile.Close
set objFSO=nothing
set objMyFile=nothing
end if

strCounter=CStr(intCounter)

for k=1 to CInt(Len(strCounter))
Response.Write("<img src=./"&strImagesFolder&"/"&Mid(strCounter,k,1)&".gif />")
next
%>

Bilgisayar Dershanesi Ders Sahibi;
Bilgisayar Dershanesi

Yorumlar

Yorum Yapabilmek İçin Üye Girişi Yapmanız Gerekmektedir.

ETİKETLER