Thursday, 08 April 2021 01:41

Hit Counter PHP Programming Example!

Written by
Rate this item
(0 votes)

Add this code to the index.php file inside Joomla! templates directory or your /var/www/ directory.
Create an empty ../counter_01.txt file and chmod 777 ../counter_01.txt and chown www-data:www-data ../counter_01.txt

Save the ../counter_01.txt file outside the www/web accessible directory since of hacker attempts to write 0 or reset the counter.

file_put_contents("../counter_01.txt", "\n", FILE_APPEND);
$linecount = 0;
$handle = fopen($file, "r");
$line = fgets($handle);

This counter read line-height or newlines instead of a number, integer, or cipher.

Music to relax to

120 Words

Read 5 times Last modified on Friday, 09 April 2021 19:38
Kim Jacobsen, Mal-Jun

Hi! My name is Kim Jacobsen, currently 39years old. I've been online since April 1994 when the internet was released to the public being from the military restricted network before. My main interest is creating solutions. Websites being the thing I spend the most time on creating. I have experience with programming as well, tweaking existing code, and optimizing designs on websites around the internet. Affiliate marketing has been an income for many years for me and me being good at it I made a substantial amount of money over time spending time online. PHP, Perl, CGI, HTML, CSS3 being my favorite languages of code. Key data storage is also a well-known experience. SEO is also interesting. Mathematic too and Graphics Design, UI (User Interface), AI (Artificial Intelligence), and Autoizations of digital entities. Apple, eBay, PayPal, Bitcoin, Gold, Titanium, Amazon, DNA, Diamant, ElNino. Astronomy.

More in this category: Code! Programming examples. »

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.