OT: getting page hit-counts for on-rev account

Medard liste.revo at medard.on-rev.com
Sat Nov 20 08:00:00 EST 2010


Nicolas Cueto <niconiko at gmail.com> wrote:

> How can one retrieve a count of the number of visitors to a specific web-page?

ça marche avec Webalizer
eeer, that works OK with Webalizer ;-)

otherwise, if you automate that, you may put a ?rev command at the top
of your web page (under the DOCTYPE declaration, and above the <html>
tag)

as this one:

=======
        <?rev
        get $_SERVER["HTTP_REFERER"]
        if it is empty then
                put "Acces direct" into torigine
        else
                put it into torigine
        end if  

        get $_SERVER["REQUEST_URI"]
        put it into tdestination
        
        get $_SERVER["REMOTE_ADDR"]
        put it into tip
        
        put "file:provenances.txt" into tfichier
        put the internet date & tab & tip & tab & torigine & tab &
tdestination & cr after URL tfichier
        
        put "file:prov_corps.html" into tpage   
        put "<tr>" into tprov
        put "<td>" & the internet date & "</td>" after tprov
        put "<td>" & tip & "</td>" after tprov
        put "<td>" & torigine & "</td>" after tprov
        put "<td>" & tdestination & "</td>" & "</tr>" & cr after tprov
        put tprov after URL tpage
        ?>
================




More information about the use-livecode mailing list