|
What You Need:
An FTP client (Transmit - external link)
A text editor (TextWrangler - external link)
1. Download the PHP Hit Counter script by clicking HERE. The file will download as hitcount.zip.
2. If the installation package doesn't expand automatically, double click the hitcount.zip file. This should force the compressed hitcount.php file to expand onto your desktop.
3. Using TextWrangler, create a blank text document called hitcount and save it to your desktop.
4. Now upload both files (hitcount & hitcount.php) into your public_html folder (or into the folder where the page with the hit counter will be).
5. Set the permissions on the file hitcount to 777. To do this using Transmit, highlight the hitcount file and press command + i. In the window that pops up, you can either type 777 into the bottom field or make sure all boxes are checked.
6. Now open the page that you want to have the hitcounter in TextWrangler. Insert the following code in the spot where you want the counter to appear:
<?php
include 'hitcount.php';
?>
Now, go to the File menu and select "Save As..."
Save the file with a .php extentsion (rather than .htm or .html). Once saved to your hard drive, upload it to you website.
7. Your Hit Counter is now setup and ready to test out. If you'd like to change the font size or color, you can do so by editing hitcount.php and re-uploading it. |