//--> <%LANGUAGE="VBScript" %> <% set conexionBD = server.createobject("ADOdb.connection") Set RS = Server.CreateObject ("ADODB.RecordSet") conexionBD.open "driver={Microsoft Access Driver (*.mdb)};" & "DBQ=" & Server.Mappath("..\db\BDAvez\contadores.mdb") sql = "SELECT * FROM contador" RS.Open sql, conexionBD, 1,3 n_ipRemota = Request.ServerVariables("REMOTE_ADDR") n_host_Remota = Request.ServerVariables("REMOTE_HOST") n_paginaEntrada = Request.ServerVariables("URL") n_nombreServidor = Request.ServerVariables("SERVER_NAME") n_protocoloServidor = Request.ServerVariables("SERVER_PROTOCOL") n_softwareServidor = Request.ServerVariables("SERVER_SOFTWARE") n_nombreNavegador = Request.ServerVariables("HTTP_USER_AGENT") n_fecha = FormatDateTime(Date) n_hora = FormatDateTime(Time) txtInsert ="INSERT INTO contador (ip_remota,host_remota,pagina_entrada,nombre_servidor,protocolo_servidor,software_servidor,nombre_navegador,t_fecha,t_hora) VALUES" txtInsert = txtInsert + "(" + "'" + n_ipRemota + "'," txtInsert = txtInsert + "'" + n_host_Remota + "'," txtInsert = txtInsert + "'" + n_paginaEntrada + "'," txtInsert = txtInsert + "'" + n_nombreServidor + "'," txtInsert = txtInsert + "'" + n_protocoloServidor + "'," txtInsert = txtInsert + "'" + n_softwareServidor + "'," txtInsert = txtInsert + "'" + n_nombreNavegador + "'," txtInsert = txtInsert + "'" + n_fecha + "'," txtInsert = txtInsert + "'" + n_hora + "'" txtInsert = txtInsert + ")" 'If RS.EOF then conexionBD.Execute (txtInsert) 'End IF totalVisitas=RS.recordcount ' Variable para ver las visitas RS.Close conexionBD.Close Set RS = nothing Set conexionBD = nothing %>
![]() |
|
|||
|
|
|
|||
|
|
|
|
||
|
|
![]() |
|
||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
||||
|
|
|
|||
|
|
|
|||
|
|
|
|||
![]() |
|
|||
|
|
|
|||
|
|
|
|||
<%response.write(TotalVisitas)%>