CounterWave is a simple access counter that developed by PHP and JavaScript.
Displays PV for the entire period and the past 30 days.
The main features are as follows.
- Count the number of visitor accesses.
- You can display PV for the entire period and the past 30 days.
- You can specify the IP address you want to exclude.
To actually use it, you must place the necessary files on the server running PHP.
- Save
counter-wave.php
/counter-wave.js
/counter-wave.css
in a suitable location. - Add the following HTML to the location of the HTML page where you want to display the access counter.
<div class="counter-wave">
<p>CounterWave</p>
<p id="totalViews">Total:</p>
<ul id="dailyViews"></ul>
<p id="startDate">Start Date:</p>
</div>
- Load CSS and JS.
Load counter-wave.js
just before the /body
tag.
<link rel="stylesheet" href="css/counter-wave.css">
<script type="text/javascript" src="js/counter-wave.js"></script>
- Edit your IP address in the excluded IP address list at the top of
counter-wave.php
and save.
// List of IP addresses to exclude from the count
$exclude_ips = array(
'1.2.3.4',
);
Distributed under the MIT License.
- Name: Shingo Suzuki
- Mail: [email protected]
- Twitter: https://twitter.com/suzushin7
- GitHub: https://github.com/suzushin7