***** gem denne kode som opret.html ***************************
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Opret link</title>
</head>
<body>
<form action="hitcounter.asp">
Hust at angive linket som
http://www.whatever.whereever <br><br>
<input type="text" name="link" maxlength="100">
<input type="submit" name="create" value="Opret link">
</form>
</body>
</html>
*****Slut ************************
****** Denne kode erstatter den index.asp du har.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Links</title>
</head>
<body>
<%
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
dim conn, strDSN
Set Conn = Server.Createobject("ADODB.Connection")
'--- Database forbindelse ---
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " &_
"DBQ=" & Server.Mappath("hits.mdb") & "; password=test"
Conn.Open strDSN
sql = "SELECT link,count(link) as mycount FROM hits group by link order by count(link) desc "
set rs = conn.execute (sql)
response.write "<table width=300 border=1 align=center>"
response.write "<tr><td>Link</td>"
response.write "<td>Hits</td></tr>"
do while not rs.eof
response.write "<tr>"
response.write "<td> <a href=hitcounter.asp?link=" & rs("link")&">" &rs("link")& "</td>"
response.write "<td>" & rs("mycount")& "</td>"
response.write "</tr>"
rs.movenext
loop
response.write "</table>"
%>
</table>
<br><br>
</body>
</html>
***************************************************
filen stat.asp bruges ikke mere.
//akj