Softpedia
 


SCRIPTS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Peardrop CMS 0.2.3
  • CommaFeed 0.0.1
  • Squash
  • Pick-a-Color 1.1.5
  • MVIS Security Center 1....
  • EasyZoom 1.0.3
  • jQueryGantt
  • IMDBPHP 2.1.8
  • Dynamic WordPress Form ...
  • PathFinding.js 0.4.1
  • Home > Scripts > Snippets

    mSQL Page Log 1.0

    download button


    Downloads: 503  Tell us about an update
    User Rating:
    Rated by:
    Good (3.5/5)
    24 user(s)
    Developer:

    Website:

    License / Price:

    Platforms:

    Databases:

    Language:

    Last Updated:

    Category:
    Rob Fisher | More scripts
    px.sklar.com
    Freeware 

    Windows / Linux / BSD / Solaris
    N/A
    PHP
    June 25th, 2007, 07:54 GMT
    C: \ Snippets

     Read user reviews (0)  Refer to a friend  Subscribe

    mSQL Page Log description

    mSQL Page Log logs hits to any page which includes it.

    This script is intended to be include()d at the end of a page, just before the tag. It appends a footer stating your name, the number of hits to the page, the time of the last hit and the date when the page was last updated. It also creates a link to the W3C HTML validator, so you are always only one click away from validating any page on your site.

    To use my script, you'll need to create a php3 database using the command "msqladmin create php3". (No quotes.) then create a table with the following commands:

    CREATE TABLE log (
    fname CHAR(128),
    hits INT,
    last_hit INT
    )g

    CREATE UNIQUE INDEX idx ON log(fname)
    g

    As you can see, this is a much more spare form of access logging than that built into PHP/FI, recording only the page name, the amount of times that page has been hit, and the date and time of the last hit. I don't need the extra information that PHP/FI logs, and keeping it builds up huge mSQL tables. If you want to record
    more data, it's not difficult to change this script.

    If you don't want to lose those hits you've worked so hard to acquire, when this script checks for hits to a page and finds none, it looks to see if an old PHP/FI access log exists for that page, and, if so, takes the number of hits and the last access from the correct table, moving that data into its own database.

    If you're going to check for old PHP/FI access logs, you need to assign the variable $UID to the UID you gave when initialising the phpfi database. If you don't want this check to be carried out, set the $check variable = false or remove the appropriate code.



    TAGS:

    mSQL Page | Page Log | mysql snippets | mSQL | Page | Log

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM