HighDots Forums  

Hit counter

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Hit counter in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
00101010
 
Posts: n/a

Default Hit counter - 11-10-2004 , 10:39 PM






I have been using dreamweaver for a while but I still have not found a way to
out in a hit counter. I need help, hopefully fast and would appreciate any
advice. I would like to do this the most simple way possible but if neccissary
CGI or javascript.

Thanks in advance.
Please help!



Reply With Quote
  #2  
Old   
.: Nadia :.TMM :.
 
Posts: n/a

Default Re: Hit counter - 11-10-2004 , 10:50 PM






take a look at www.hotscripts.com
I'm sure you'll find various hitcounter scripts there. Also check with your
host, sometimes they supply such scripts as part of your hosting package...

PS: Hit counters look a bit amateurish (imho), you are better off trying to
use a stats program - once again possibly supplied by your host.


--
Nadia
Team Macromedia Volunteer for Dreamweaver
---------------
Free Templates | Free Nav Bar Sets
http://www.DreamweaverResources.com
Dropdown Menu Designs | CSS Layouts
Ecommerce - YVStore | SEO Articles
Table Tutorials | Background image Tutorials
------------------------------------------------
MM Dreamweaver Tutorials
http://macromedia.com/devnet/mx/dreamweaver/
------------------------------------------------




"00101010" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have been using dreamweaver for a while but I still have not found a way
to
out in a hit counter. I need help, hopefully fast and would appreciate any
advice. I would like to do this the most simple way possible but if
neccissary
CGI or javascript.

Thanks in advance.
Please help!





Reply With Quote
  #3  
Old   
Peadge
 
Posts: n/a

Default Re: Hit counter - 11-10-2004 , 11:08 PM



Google "hit counters" and you will find tons of free ones.

Peadge :-)

"00101010" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have been using dreamweaver for a while but I still have not found a way
to
out in a hit counter. I need help, hopefully fast and would appreciate any
advice. I would like to do this the most simple way possible but if
neccissary
CGI or javascript.

Thanks in advance.
Please help!





Reply With Quote
  #4  
Old   
rasherverahack
 
Posts: n/a

Default Re: Hit counter - 11-10-2004 , 11:10 PM



Here is the code I used for a hit counter on my web page.
You will need the following:
10 images (0-9) (located in filelocation/images/)
blank counter.txt file in the same directory as this script:



<?php
if (isset($_COOKIE['counter'])) {

$current = file('counter.txt'); // Get contents of text file. (Each char is in
an array)
$current = implode(' ',$current); // Bring the array togerther to get the
integer
$imgdisp = $current; // Copy value of *new* $current to $imgdisp.
for($i=0; $i<10; $i++) { // For loop.
$imgdisp = str_replace($i,'<IMG SRC="images/' . $i . '.gif">',$imgdisp); //
Replace number with image.
} // End loop.
echo "<center><font color=\"#003366\"><b>Hits:</b></font> $imgdisp </center>";
// Display counter.
$fp = fopen('counter.txt','w'); // Get ready to write.
fputs($fp,$current); // Replace old text file value with new one.
fclose($fp); // Close the file connection.
} else {
setcookie ('counter', '1', time()+3600);
$current = file('counter.txt'); // Get contents of text file. (Each char is in
an array)
$current = implode(' ',$current); // Bring the array togerther to get the
integer
$current++; // Add one to the value.
$imgdisp = $current; // Copy value of *new* $current to $imgdisp.
for($i=0; $i<10; $i++) { // For loop.
$imgdisp = str_replace($i,'<IMG SRC="images/' . $i . '.gif">',$imgdisp); //
Replace number with image.
} // End loop.
echo "<center><font color=\"#003366\"><b>Hits:</b></font> $imgdisp </center>";
// Display counter.
$fp = fopen('counter.txt','w'); // Get ready to write.
fputs($fp,$current); // Replace old text file value with new one.
fclose($fp); // Close the file connection.
}
?>


Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: Hit counter - 11-11-2004 , 12:15 AM



"rasherverahack" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Here is the code I used for a hit counter on my web page.
You will need the following:
10 images (0-9) (located in filelocation/images/)
blank counter.txt file in the same directory as this script:

Hmmm... Here's one that's a bit easier. ;-)

<script type="text/javascript">
document.write('You are visitor number '+
Math.ceil(Math.random()*1000000));
//document.write(Math.ceil(Math.random()*1000000));
</script>


Gary




Reply With Quote
  #6  
Old   
Joe Makowiec
 
Posts: n/a

Default Re: Hit counter - 11-11-2004 , 07:45 AM



On 11 Nov 2004 in macromedia.dreamweaver, Gary White wrote:

Quote:
Hmmm... Here's one that's a bit easier. ;-)
And probably as accurate...

Quote:
script type="text/javascript"
document.write('You are visitor number '+
Math.ceil(Math.random()*1000000));
//document.write(Math.ceil(Math.random()*1000000));
/script


--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Reply With Quote
  #7  
Old   
Gary White
 
Posts: n/a

Default Re: Hit counter - 11-11-2004 , 09:31 AM



Joe Makowiec wrote:

Quote:
And probably as accurate...

<chuckle> Joe got my point. ;-)


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.