Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Web page info stats

  1. #1
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default Web page info stats

    I would like to know how many times a web page has been visited.
    I do not require a visible hit counter but maybe more along the lines of php file maybe ?

    I would add each web page url to the file in question and each time a page is loaded update the figure next to the url etc.
    It doesn't need to be fancy at all but have it to sort the order from most to least hits.
    Example.
    Url example a 13
    Url example e 11
    Url example c 9
    Url example b 4
    Url example d 0

    OR

    I did think about having a hit counter on each page but make it invisible & only to be shown when you mouse over a wild card etc on the page & mouse off would make it hidden again.
    The wild card could even be a small jpg box which would be the same colour as its background so it doesn't stand out and I would know where it was to view the counter.
    Or to use on click function.

    What do you think ?
    Last edited by theremotedr; 07-09-2015 at 07:09 AM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,514
    Thanks
    16
    Thanked 427 Times in 425 Posts
    Blog Entries
    21

    Default

    Why not use Google Analytics?

    Or look through the scripts here http://www.hotscripts.com/category/s...ipts-programs/
    Last edited by Beverleyh; 07-08-2015 at 05:02 AM.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default

    This is what i would like to incorporate into my pages.

    http://www.rxs-enterprises.org/fp/ar...t_Counter.aspx

  4. #4
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default

    ok,forget the above.
    I have looked at the link you supplied and found that this item looks like what i need.
    http://www.hotscripts.com/listing/an...phpagecounter/

    Just need help with the following info.

    $website="www.wgrep.com"; //Your website here
    $rp =$_SERVER['PHP_SELF'];
    $ip =$_SERVER['REMOTE_ADDR'];
    $counter_host = "localhost"; //your mysql server
    $counter_user = "root"; //your mysql username
    $counter_pass = ""; //your mysql password
    $counter_database = "counter"; //your mysql database

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,514
    Thanks
    16
    Thanked 427 Times in 425 Posts
    Blog Entries
    21

    Default

    What exactly do you need help with?
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #6
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default

    Not sure what to put where it shows your mysql server.
    I have done the others,is that something you can check to see if its correct
    ?

  7. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,514
    Thanks
    16
    Thanked 427 Times in 425 Posts
    Blog Entries
    21

    Default

    The mysql server is the server that your database is stored on. It could be "localhost", or an IP address like "127.0.0.1", or something like "db.webhost.com" - depends how your web host is set up. You should be able to find this information in your host control panel, otherwise, ask your web host.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. #8
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default

    Its localhost.
    But just dont understand the instructions to set it up.
    Its written as if you know all the lingo to start with.
    I have unziped the files into a folder called counter and uploaded them.
    I have added the details for server,username etc.
    Now stumped.

    1) unzip all files to a directory I called counter
    2) Then Install the database named counter
    then use the code below to create the table.
    3) Edit counter.php changing the values to your server and mysql details
    you can also modify the output strings if necessary.
    4) Then to run as a sitewide counter at the top of
    every page, point the auto prepend part of php.ini to counter.php
    comment out the include ((( //include ("../counter/counter.php"); ))) at the top
    of count.php, zerocounter.php, and del,php.
    example(( auto_prepend_file="c:/inetpub/wwwroot/counter/counter.php" )))))
    OR
    4) The counter can be called on a per page only basis by uncommenting the include at the top of
    count.php, zerocounter.php, and del,php and including counter.php in the page
    example ((( include ("../counter/counter.php"); )))
    5) the script count.php is the administration page you can modify or delete specific pages
    6) email me if you find this useful.
    7) the number images should be replaced with your own these are provided as examples only.

  9. #9
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    2,514
    Thanks
    16
    Thanked 427 Times in 425 Posts
    Blog Entries
    21

    Default

    It looks like you just need to do step 4 - the second one (I'm assuming you're on shared hosting so it's unlikely that you will be able to openly edit your php.ini file or be allowed to upload a custom one to your root folder, so ignore the first step 4)

    So open the 3 advised files (count.php, zerocounter.php, and del.php) and uncomment the include command at the top of the files.

    Then you add the advised PHP counter include at the top of the web pages you want to track (right at the top - before any whitespace or Doctype), making sure the path to the counter is right. You may need to include the opening and closing PHP tags too;
    Code:
    <?php include ("../counter/counter.php"); ?>
    Bear in mind that this is a PHP script so it runs on web pages ending .php

    If yours aren't .php web pages, you can rename them and setup 301 redirects in .htaccess (if your web host permits .htaccess) to avoid destroying your SEO and indicate to search engines that the pages have moved http://301redirects.net/301-redirect...extensions.php

    OR you can configure .html/.htm pages to parse PHP (if your server permits it and if you're allowed to edit your .htaccess file) http://stackoverflow.com/questions/4...n-as-php-files

    If these method don't work, Google for alternatives or speak to your web host.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  10. #10
    Join Date
    Nov 2011
    Posts
    429
    Thanks
    51
    Thanked 2 Times in 2 Posts

    Default

    Thanks for the help but i must stop there as im getting deeper and deeper into unknown waters.
    I will sort something out and start a new post i think.

    Thanks so far

Similar Threads

  1. Marquee that updates with page info
    By KFizzle23 in forum Looking for such a script or service
    Replies: 1
    Last Post: 06-10-2009, 03:16 PM
  2. Getting info from the web page
    By Destroyer in forum JavaScript
    Replies: 6
    Last Post: 08-28-2007, 08:11 AM
  3. sending info to second page?
    By meridian2000 in forum JavaScript
    Replies: 1
    Last Post: 04-28-2006, 04:57 PM
  4. info from one page to another
    By cnseditor in forum JavaScript
    Replies: 4
    Last Post: 03-25-2006, 01:41 PM
  5. refreshing info on page with iframes
    By dmcrabby in forum HTML
    Replies: 0
    Last Post: 04-07-2005, 06:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •