# Hit counter

**URL:** <https://forum.kirupa.com/t/hit-counter/58000>\
**Category:** Uncategorized\
**Created:** [July 18, 2004, 11:36pm UTC](https://forum.kirupa.com/t/hit-counter/58000 "2004-07-18T23:36:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fiery\_rockstar](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@fiery\_rockstar](https://forum.kirupa.com/u/fiery_rockstar)\
**Post date:** [July 18, 2004, 11:36pm UTC](https://forum.kirupa.com/t/hit-counter/58000/1 "2004-07-18T23:36:50Z")

</div>

Does anyone know how to make a hit counter in flash that will load up pictures instead of just text?

Cheers, J

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:22am UTC](https://forum.kirupa.com/t/hit-counter/58000/2 "2004-07-19T00:22:05Z")

</div>

Well you’ll probably need a Database and some language to talk to the database. Just add the code on your main page to update the DB by 1 everytime the page is loaded. Then using string variables pass that number to the flash file to display.

With that being said. HitCounters are super cool if you live in 1997

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:24am UTC](https://forum.kirupa.com/t/hit-counter/58000/3 "2004-07-19T00:24:37Z")

</div>

_ponders_ any suggestions on where I can find the code to do that?

With that being said you have a good point there…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:26am UTC](https://forum.kirupa.com/t/hit-counter/58000/4 "2004-07-19T00:26:54Z")

</div>

What kind of code does your hosting support?

I think I have some moral obligation to not help you any further with setting up a counter though.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:28am UTC](https://forum.kirupa.com/t/hit-counter/58000/5 "2004-07-19T00:28:07Z")

</div>

My hosting supports everything under the sun.

And… ok?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:34am UTC](https://forum.kirupa.com/t/hit-counter/58000/6 "2004-07-19T00:34:49Z")

</div>

Then here is is int ColdFusion Talking to a SQL Database.  
You’ll have to change things and fill in the blanks for your server.

//Update the record count in the db

```auto

<cfquery name="UpdateCounter" datasource="" dbname="" dbserver="" password="" username="">
	UPDATE MYCounterDB
	Set CounterNumField = CounterNumField + 1
</cfquery>

```

//Will get the number of hits from the db

```auto

<cfquery name="UpdateCounter" datasource="" dbname="" dbserver="" password="" username="">
	UPDATE MYCounterDB
	Set CounterNumField = CounterNumField + 1
</cfquery>

```

#GetCounterTotal.CounterNumField# is the variable to pass onto flash.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:40am UTC](https://forum.kirupa.com/t/hit-counter/58000/7 "2004-07-19T00:40:03Z")

</div>

to actually display the images in flash, it would probably be more efficient to use explode or split to get the seperate numbers in the string and then have 10 different images (0 1 2 3 4 5 6 7 8 9) and then load in the ones you need to make up your number.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 12:48am UTC](https://forum.kirupa.com/t/hit-counter/58000/8 "2004-07-19T00:48:04Z")

</div>

I’m so lost right now it isn’t funny 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 1:07am UTC](https://forum.kirupa.com/t/hit-counter/58000/9 "2004-07-19T01:07:15Z")

</div>

i wouldnt advise hit counters…they seem unprofessional. another reason i h8 em is that there part of that whole animated gif horror…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 1:52am UTC](https://forum.kirupa.com/t/hit-counter/58000/10 "2004-07-19T01:52:08Z")

</div>

you I agree with Color

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 2:04am UTC](https://forum.kirupa.com/t/hit-counter/58000/11 "2004-07-19T02:04:50Z")

</div>

what website are you building? Is it personal, or for a client?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2004, 1:24pm UTC](https://forum.kirupa.com/t/hit-counter/58000/12 "2004-07-19T13:24:43Z")

</div>

It’s for my bands website, thats why we want a hit counter cause otherwise I agree that they do look completly… naff…
