5 <?xml version="1.0" encoding="iso-8859-1"?>
7 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
8 "DTD/xhtml1-transitional.dtd">
12 <title>umweb: counter</title>
14 <style type="text/css">
24 text-decoration: underline;
29 text-decoration: underline;
40 font-family: arial, helvetica, sans-serif;
50 background-color: #ffffff;
58 background-image: url( "images/blue-stripes.gif" );
63 font-family: courier, courier new, monospace;
69 font-family: arial, helvetica, sans-serif;
80 font-family: arial, helvetica, sans-serif;
86 font-family: arial, helvetica, sans-serif;
122 p.label, span.label {
123 font-family: arial, helvetica, sans-serif;
130 p.margins, pre.margins {
139 font-family: verdana, arial, helvetica, sans-serif;
153 font-family: verdana, arial, helvetica, sans-serif;
164 font-family: courier, courier new, monospace;
174 border: 1px solid black;
179 font-family: arial, helvetica, sans-serif;
180 background-color: #bbcbff;
204 <table width="100%" border="0" cellpadding="0" cellspacing="0">
206 <td align="left" bgcolor="#333366">
207 <a href="http://www.itd.umich.edu/" class="titleImg"><img src="http://www.itd.umich.edu/images/itcs-banner.gif" width="455" height="20" border="0" alt="information technology central services at the university of michigan" /></a>
210 <td align="right" bgcolor="#333366">
211 <img src="http://www.itd.umich.edu/date/Thursday.gif" alt="Thursday" /><img src="http://www.itd.umich.edu/date/April.gif" alt="April" /><img src="http://www.itd.umich.edu/date/24.gif" alt="24" /><img src="http://www.itd.umich.edu/date/2003.gif" alt="2003" />
215 <!-- end ITCS header -->
217 <table width="100%" border="0" cellpadding="3" cellspacing="0">
219 <td bgcolor="#000066"
220 background="../../images/blue-stripes.gif"
222 src="../../images/umweb-small.gif"
223 width="350" height="71" alt="um web services"
224 border="0" class="logo" />
233 <table width="100%" border="0" cellspacing="3">
236 <td width="125" align="center" valign="top">
237 <table width="125" cellpadding="1" border="0">
239 <td bgcolor="#000000" width="125">
240 <table width="125" cellspacing="0" cellpadding="3" border="0">
242 <td width="125" bgcolor="#dddddd" align="left">
246 <a href="../..">home</a><br />
251 <a href="../../faq/">FAQ</a><br />
260 <a href="../../how-to/">how-to</a><br />
268 <a href="../../how-to/homepage.html">homepage</a> <br />
272 → <a href="../../how-to/cgi-scripts/">cgi scripts</a> <br />
276 <a href="../../how-to/weblogin.html">weblogin</a> <br />
280 <a href="../../how-to/sql.html">SQL</a> <br />
290 <a href="../../services/">services</a><br />
298 <a href="../../software/">software</a><br />
303 <!-- commented out until it is ready: clunis 8/13
307 <a href="../../statistics/">statistics</a><br />
314 <a href="../../team/">team</a><br />
321 <a href="../../contact/">contact</a> <br />
335 <!-- left inner margin -->
337 <img src="../../images/trans.gif"
341 <!-- main body column -->
342 <td width="600" valign="top">
343 <!-- ====== header and breadcrumbs ==== -->
345 <table cellpadding="0" cellspacing="8" border="0" width="90%">
357 this is formatted tight to avoid whitespace and wrapping
360 <a href="../..">home</a> / <a href="../../how-to/">how-to</a> / <a href="../../how-to/cgi-scripts/">cgi-scripts</a> / <b>counter</b>
369 <table cellpadding="6" cellspacing="4" border="0" width="90%">
372 <td bgcolor="#dddddd">
373 <p class="hedr">Counter - an approximate count of hits on your page</p>
380 <a href = "./counter-faq.html">Counter</a> allows
381 you to display an image representing an access counter on a
382 given page. To put a counter on a page, include a tag
387 <img src="http://cgi.www.umich.edu/counter?link=
388 http://www.umich.edu/~umweb/index.html"></pre>
391 <b>Note:</b> This line must appear in your html
392 document on only one line. If you copy and paste any
393 of the counter examples from this page to your own
394 document, be sure to edit the file and remove any line
395 breaks in the counter link.
401 <td bgcolor="#dddddd">
402 <p class="hedr">Counter options</p>
409 The <b>link=</b> argument specifies the URL to be counted. It is
410 required. Additional arguments must be separated from each other by
415 The <b>ignore=</b> argument specifies IP
416 addresses (141.211.164.2) or domain names
417 (terminator.cc.umich.edu) that are forbidden from
418 incrementing the counter.
422 The <b>font=</b> argument specifies a font to use instead of
423 the counter's default. If you have a freely available
424 truetype font that you would like to see added to this
425 list please submit download information, author's name,
426 and contact information to webmaster. We will not be
427 able to add every font that is submitted.
431 The <b>width=</b> argument specifies how many digits are
432 displayed & has a maximum of ten. If you specify a
433 width that is too small for the number being displayed,
434 the counter will use only as many digits as it needs.
435 If you specify too large a width, the counter will pad
436 the number being displayed with zeros.
440 The <b>rand=</b> argument will cause the counter to display a
441 different random number everytime your page loads.
445 The <b>reset=</b> argument allows you to reset the counter to
450 The <b>text=</b> argument allows you to set the font color
451 using the "web color" scheme. For instance, to get a
452 counter with black text, set "text=000000". Note that "#"
453 is interpreted as an anchor by the browser, and as such
454 must be ommitted. "text=#000000" will not behave as you
458 The <b>bgcolor=</b> argument allows you to set the background
459 color using the "web color" scheme. For instance, to get
460 a counter with a white background, set "bgcolor=ffffff".
461 Note that "#" is interpreted as an anchor by the browser,
462 and as such must be ommitted. "bgcolor=#ffffff" will not
463 behave as you expect.</p>
466 The <b>point=</b> argument allows you to set the point size
467 of the counter. Note this will only work in conjunction
468 with the font= argument, as the default font cannot be
472 The <b>image=</b> argument allows you to make the counter
473 generate PNG images rather than the default image format,
474 JPEG. JPEG has been chosen as the default image format
475 because, being rendered internally by most browsers, JPEG
476 images appear to load more quickly and match the other
477 colors presented by the browser better than PNG files.
478 However, the image quality of JPEGs is lower than that of
479 PNG. PNG appears to be slower on some browsers ( those
480 that use a helper application to render the images may
481 appear to "hang" for a moment when loading the counter
482 image ) but the quality is superb.
489 <td bgcolor="#dddddd">
490 <p class="hedr">Counter options</p>
498 There is only one required argument in the counter:
499 <b>link=<i>URL</i></b>. There are other, optional
500 arguments, each of which needs to be separated by &
501 signs. All of the applicable arguments are listed below:
504 <table border="0" cellpadding="1" cellspacing="1">
508 <th>Example Image</th>
513 <td>link=http://www.umich.edu</td>
515 <td><img src="http://cgi.www.umich.edu/counter?link=http://www.umich.edu" alt="" /></td>
516 <td>The URL of the page using the counter.</td>
522 <td><img src="http://cgi.www.umich.edu/counter?rand=true" alt="" /></td>
523 <td>Whether or not to display a random number.</td>
527 <td valign="top">font=gd</td>
528 <td rowspan="16" valign="top">gd is the default font</td>
529 <td><img src="http://cgi.www.umich.edu/counter?link=http://www.umich.edu/counter.html" alt="" /></td>
530 <td rowspan="16">The digit style of the counter.</td>
534 <td>font=transit</td>
535 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=transit" alt="" /></td>
540 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=stylus" alt="" /></td>
544 <td>font=steamer</td>
545 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=steamer" alt="" /></td>
550 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=buff" alt="" /></td>
554 <td>font=zoinkfat</td>
555 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=zoinkfat" alt="" /></td>
559 <td>font=simpson</td>
560 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=simpson" alt="" /></td>
565 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=adlibn" alt="" /></td>
569 <td>font=signboard</td>
570 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=signboard" alt="" /></td>
575 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=arial" alt="" /></td>
580 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=comic" alt="" /></td>
584 <td>font=courier</td>
585 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=courier" alt="" /></td>
590 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=impact" alt="" /></td>
594 <td>font=trebuchet</td>
595 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=trebuchet" alt="" /></td>
599 <td>font=verdana</td>
600 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=verdana" alt="" /></td>
605 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=lumos" alt="" /></td>
611 <td><img src="http://cgi.www.umich.edu/counter?rand=true&width=9" alt="" /></td>
613 This setting determines how many digits are
614 displayed & has a maximum of ten.
621 <td><img src="http://cgi.www.umich.edu/counter?link=http://www.umich.edu/counter.html&reset=1202" alt="" /></td>
622 <td>Used to reset the counter to a specific, non-negative value. </td>
628 <td><img src="http://cgi.www.umich.edu/counter?rand=true&text=9933ff" alt="" /></td>
629 <td>Used to set the font color of the counter.</td>
633 <td>bgcolor=ffffff</td>
634 <td>bgcolor=000000</td>
635 <td><img src="http://cgi.www.umich.edu/counter?rand=true&bgcolor=ffffff&text=000000" alt="" /></td>
636 <td>Used to set the background color of the counter.</td>
642 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=comic&point=36" alt="" /></td>
643 <td>Used to set the point size of the counter font.</td>
649 <td><img src="http://cgi.www.umich.edu/counter?rand=true&font=comic&image=png" alt="" /></td>
650 <td>Used to set the output format of the counter image. </td>
661 <!-- right outer margin -->
663 <img src="../../images/trans.gif"
670 <p class="footer" align="right">
674 Copyright © 2001 - 2003
675 Regents of the University of Michigan <br />
679 Tuesday, 15 April 2003 <br />