Location: PHPKode > scripts > phpHitCounter > phphitcounter/docs/manual.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class hc</title><link rel="stylesheet" href="stylesheet.css" />
			
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class hc</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
			</div>
	<div class="info-box-body">
		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class to create a image or text based hitcounter</p>
		<p class="notes">
			Located in <a class="field" href="_hitcounter_class_php.html">/hitcounter.class.php</a> (line <span class="field">12</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$counterMode" title="details" class="var-name">$counterMode</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$counterTheme" title="details" class="var-name">$counterTheme</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$fileName" title="details" class="var-name">$fileName</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$imagePath" title="details" class="var-name">$imagePath</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$imageType" title="details" class="var-name">$imageType</a>
				</div>
								<div class="var-title">
					<span class="var-type">boolean</span>
					<a href="#$uniqueHit" title="details" class="var-name">$uniqueHit</a>
				</div>
								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$visitorFile" title="details" class="var-name">$visitorFile</a>
				</div>
							</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">hc</span>
										<a href="#hc" title="details" class="method-name">hc</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$counterFile</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$forceCreate</span> = <span class="var-default">false</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$visitFile</span> = <span class="var-default">NULL</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#hitSite" title="details" class="method-name">hitSite</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setCounterMode" title="details" class="method-name">setCounterMode</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">'text'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$imageFormat</span> = <span class="var-default">'gif'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$imagePath</span> = <span class="var-default">'./images/'</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setTheme" title="details" class="method-name">setTheme</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$themeName</span> = <span class="var-default">'default'</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#showCounter" title="details" class="method-name">showCounter</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#uniqueVisitor" title="details" class="method-name">uniqueVisitor</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$unique_visitors</span> = <span class="var-default">false</span>])
									</div>
							</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$counterMode" id="$counterMode"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$counterMode</span>
			 = <span class="var-default">	'text'</span>			(line <span class="line-number">39</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the mode in which the counter is displayed : image or text</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$counterTheme" id="$counterTheme"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$counterTheme</span>
			 = <span class="var-default">	'default'</span>			(line <span class="line-number">60</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the counter theme, to be used only with the image mode</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$fileName" id="$fileName"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$fileName</span>
			 = <span class="var-default">	NULL</span>			(line <span class="line-number">18</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File which stores the site hits</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$imagePath" id="$imagePath"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$imagePath</span>
			 = <span class="var-default">	'./images/'</span>			(line <span class="line-number">53</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the image path</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$imageType" id="$imageType"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$imageType</span>
			 = <span class="var-default">	'gif'</span>			(line <span class="line-number">46</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the type of image to be used for the hit counters</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$uniqueHit" id="$uniqueHit"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">boolean</span>
			<span class="var-name">$uniqueHit</span>
			 = <span class="var-default"> 	false</span>			(line <span class="line-number">32</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Allow only unique visitors ?</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$visitorFile" id="$visitorFile"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$visitorFile</span>
			 = <span class="var-default">	NULL</span>			(line <span class="line-number">25</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">File which stores the ip of the visitors</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodhc" id="hc"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor hc</span> (line <span class="line-number">69</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class constructor</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">hc</span>
		<span class="method-name">
			hc
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$counterFile</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$forceCreate</span> = <span class="var-default">false</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$visitFile</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$counterFile</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$forceCreate</span>			</li>
				</ul>
		
		
	</div>
<a name="methodhitSite" id="hitSite"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">hitSite</span> (line <span class="line-number">125</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Register a site hit</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			hitSite
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodsetCounterMode" id="setCounterMode"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setCounterMode</span> (line <span class="line-number">97</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the counter mode, ie. image or text</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setCounterMode
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">'text'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$imageFormat</span> = <span class="var-default">'gif'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$imagePath</span> = <span class="var-default">'./images/'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$mode</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$imageFormat</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$imagePath</span>			</li>
				</ul>
		
		
	</div>
<a name="methodsetTheme" id="setTheme"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setTheme</span> (line <span class="line-number">153</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the counter theme in case of image mode</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setTheme
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$themeName</span> = <span class="var-default">'default'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$themeName</span>			</li>
				</ul>
		
		
	</div>
<a name="methodshowCounter" id="showCounter"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">showCounter</span> (line <span class="line-number">162</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Display the counter</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			showCounter
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methoduniqueVisitor" id="uniqueVisitor"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">uniqueVisitor</span> (line <span class="line-number">85</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Visitors should be unique or not?</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			uniqueVisitor
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$unique_visitors</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$unique_visitors</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>
	
	<p class="notes" id="credit">
		Documentation generated on Sat, 30 Apr 2005 13:24:47 +0530 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.2.3</a>
	</p>
	</div></body>
</html>
Return current item: phpHitCounter