<% ip=request.Servervariables("remote_Addr") Dim conexao Dim recordset Set conexao = Server.CreateObject("ADODB.Connection") conexao.Open "Driver={Mysql}; Server=localhost; " &_ "Database=carreira_acesso; UID=carreira_acess; " &_ "PWD=ascbd" data=date data=day(data) & "/" & month(data) & "/" & year(data) if mid(data,4,1)="/" or mid(data,5,1)="/" or mid(data,2,1)="/" then if mid(data,2,1)="/" and mid(data,4,1)="/" then dia=mid(data,1,1) mes=mid(data,3,1) ano=mid(data,5,4) else if mid(data,2,1)="/" and mid(data,5,1)="/" then dia=mid(data,1,1) mes=mid(data,3,2) ano=mid(data,6,4) else if mid(data,3,1)="/" and mid(data,5,1)="/" then dia=mid(data,1,2) mes=mid(data,4,1) ano=mid(data,6,4) end if end if end if data=dia & "/" & mes & "/" & ano else dia=mid(data,1,2) mes=mid(data,4,2) ano=mid(data,7,4) data=dia & "/" & mes & "/" & ano end if ip = request.Servervariables("REMOTE_ADDR") logon=request.Servervariables("AUTH_USER") if logon="" then logon="_" host=request.Servervariables("REMOTE_HOST") IF host="" THEN host=request.Servervariables("SERVER_NAME") else if host="" then host="_" END IF origem=Request.ServerVariables("HTTP_REFERER") if origem="" then origem="_" cookie=request.servervariables("HTTP_COOKIE") if cookie="" then cookie="_" set recordset=conexao.execute("Select * from contador where ip='"&ip&"' and data='"&data&"'") if recordset.eof=true then valor=1 zero=0 tr=0 set recordset=conexao.execute("insert into contador (data,ip,inter,bra) values ('"&data&"','"&ip&"','"&zero&"','"&zero&"')") end if %>