Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    I want to have a script that reads the apache log files which are written in the following format:

    Code:
    philbaucutt.co.uk: [12/Sep/2007:12:27:00 +0100] 86.22.147.179 - - "GET /?p=home HTTP/1.1" 200 1700 "http://philbaucutt.co.uk/?p=web" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"
    and insert them into a database is there a script available and/or how would I go about writing one
    Regards Phil,


  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    You're going to need to familiarize yourself thoroughly with regular expressions

  4. #3
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    hurmm think ill stick with loggin what PHP can tell me
    Regards Phil,


  5. #4
    Junior Member
    Join Date
    Sep 2007
    Location
    Las Vegas, NV
    Posts
    6
    Member #
    15827
    For sure, regular expressions will be your new best friend on a project like that.

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Regular expressions, I should mention, are terribly useful regardless. They open up a new approach to many problems. So while you may feel they're overkill for this, having them in your toolbox will be terribly useful.

  7. #6
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    I think im going to stick with what PHP can tell me
    Regards Phil,


  8. #7
    Junior Member
    Join Date
    Sep 2007
    Location
    Las Vegas, NV
    Posts
    6
    Member #
    15827
    Quote Originally Posted by leprechaun13
    I think im going to stick with what PHP can tell me
    Not a bad choice. PHP has all of the information available. I do agree with the above statement, regular expressions are definately an added bonus. I would recommend learning them even if you plan on using the PHP server variables. Good luck.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com