---
title: "Gratis Räknare script problem."
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/108741-gratis-räknare-script-problem"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "voigtann1"
published: "2004-08-07T18:57:25.000Z"
updated: "2004-08-07T18:57:25.000Z"
replies: 0
views: 259
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/108741-gratis-räknare-script-problem"
---

# Gratis Räknare script problem.

## #1 — voigtann1, 2004-08-07T18:57Z

Jag använder denna kod:

```
  If Instr(url,Request.ServerVariables("HTTP_REFERER"))>0 Then
    If NOT Request.Cookies("counting")("userID" & id) = "voigtancount30" then
      Response.Cookies("counting")("userID" & id) = "voigtancount30"
      Response.Cookies("counting").Expires = DateAdd("h",3,Now())
        SQL = "UPDATE [counter] SET [visitors] = visitors + 1 WHERE [accountID] = "& id
        conn.Execute(SQL)
    end if
  else
    response.write "document.write(""You cant use this counter"")<br>"  & vbCrLf
  end if
end if
```

för att göra så att inte personen kan få hur många träffa som helst på sin räknare.. fast det verka som om cookien som ska skapas... skapas inte. för man kan uppdatera hur många gånger man vill och få +1 varje gång. 
variablen "url" är den hemsida där scriptet ska vara tex <http://webforum.nu/test.asp>

kör scriptet med detta: 

> \<script language="javascript" src="http://voigt.se/counter/counter.asp?id=3&type=pixel"\>\</script\>

Permalänk: https://www.webforum.nu/p/108741

---

Tråden på webben: https://www.webforum.nu/amne/asp/108741-gratis-räknare-script-problem
