+ 1

Hey guys I got a code from a site to count number of visits to a page .(need help understanding it's working)

https://code.sololearn.com/W2GYykIIA2ZT/?ref=app I tried it on sololearn and another mobile compiler and the code counts both. I don't know much on html so I can't understand deeply but can someone explain to me how it's workin?(just functioning)

6th Oct 2018, 3:38 PM
partha
partha - avatar
6 Respuestas
+ 6
Main code is on line 9. Every time code runs and browser receives image from src, their PHP page increases one hit per one server request.
6th Oct 2018, 4:02 PM
Roneel
Roneel - avatar
+ 5
If you have curiosity: initCount is initial count - means from which number to start hit counter. Digits can be changed as some sites have hits in millions - they need at least 7 digits. Style - as you wish there are 50 different styles.
6th Oct 2018, 4:11 PM
Roneel
Roneel - avatar
+ 1
partha I believe that at hitwebcounter.com there is a backend script that increments a counter everytime it receives a request for the page.
6th Oct 2018, 4:04 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
thanks Ulisses Cruz and Roneel I get the basic working 😀
6th Oct 2018, 4:08 PM
partha
partha - avatar
0
Roneel I studied html just by curiousity some years ago then discontinued for some reason and now studying python.( you can check my profile html is still incomplete and so I forgot it's way of doing , currently I'm a bit busy and can't go back to html at least for now)😔
6th Oct 2018, 4:20 PM
partha
partha - avatar
0
but I'll be sure to complete html ASAP ✌️
6th Oct 2018, 4:21 PM
partha
partha - avatar