Showing Awstats data in home page

Discussion in 'PHP' started by KingCobra, Aug 2, 2009.

  1. #1
    In my cpanel I have a free installed stat (cgi) script named Awstats.
    This script statistics my full site. To show stat I have to login cpanel.

    But I want to show some stat data in my home page so that everybody can see that. Such as -
    Hits: 23720
    Visits: 6164

    (see the Awstat image)

    [​IMG]

    How can I get data from this script by PHP and show my home page?
    PLEASE HELP.
     
    Last edited: Aug 2, 2009
    KingCobra, Aug 2, 2009 IP
  2. maneetpuri

    maneetpuri Active Member

    Messages:
    152
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Hi,

    Generally Awstats save the logged stats at a location which is not accessible from the PHP scripts running from htdocs. If you have to do this you will have to change the settings of Awstats such that it start storing the logs at a location which can be access from php scripts. This is not an advisable thing to do because it results into security loop holes. The better option is to integrate some visitor count tracking script on your home page.

    Hope this helps,

    Maneet Puri
     
    maneetpuri, Aug 6, 2009 IP