PHPackages                             theodorejb/iis-log-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. theodorejb/iis-log-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

theodorejb/iis-log-parser
=========================

Parse IIS log files

v1.0.1(2y ago)03.7k↓16.7%MITPHPPHP &gt;=8.1CI passing

Since May 5Pushed 4w ago1 watchersCompare

[ Source](https://github.com/theodorejb/iis-log-parser)[ Packagist](https://packagist.org/packages/theodorejb/iis-log-parser)[ RSS](/packages/theodorejb-iis-log-parser/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

IIS Log Parser
==============

[](#iis-log-parser)

This package makes it easy to parse IIS log files using PHP. Supports the standard W3C log file format with default fields as well as the optional Host field.

Install via Composer
--------------------

[](#install-via-composer)

`composer require theodorejb/iis-log-parser`

Usage
-----

[](#usage)

Construct an `SplFileObject` instance for the IIS log file to be parsed. Then call the `IISLogFile::getEntries` static method, passing it the `SplFileObject`. This returns a generator which yields an `IISLogEntry` object for each entry in the file.

Code example which iterates over the entries of all log files in a directory:

```
use theodorejb\IISLogParser\IISLogFile;

$directory = new \FilesystemIterator('C:/inetpub/logs/LogFiles/W3SVC1');

while ($directory->valid()) {
    $current = $directory->current();
    echo "Processing {$current->getFilename()}\n";

    $entries = IISLogFile::getEntries($current->openFile());

    foreach ($entries as $entry) {
        echo "Request to {$entry->uri} occurred on {$entry->date->format(DATE_ATOM)}\n";
    }

    echo "\n";
    $directory->next();
}
```

The `IISLogEntry` class has the following public properties:

- `DateTimeImmutable $date`
- `string $serverIP`
- `string $method`
- `string $uri`
- `string $query`
- `int $serverPort`
- `string $username`
- `string $clientIP`
- `string $useragent`
- `string $referer`
- `string $host`
- `int $statusCode`
- `int $subStatusCode`
- `int $win32StatusCode`
- `int $timeTakenMs`

It also has a public `getUriExtension()` method.

Required fields
---------------

[](#required-fields)

Only the Date and Time logging fields (used for the `$date` property) are required. Other properties will be set to a blank string (or 0, for int properties) if the associated logging field is absent.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance62

Regular maintenance activity

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~138 days

Total

2

Last Release

1017d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3053271?v=4)[Theodore Brown](/maintainers/theodorejb)[@theodorejb](https://github.com/theodorejb)

---

Top Contributors

[![theodorejb](https://avatars.githubusercontent.com/u/3053271?v=4)](https://github.com/theodorejb "theodorejb (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/theodorejb-iis-log-parser/health.svg)

```
[![Health](https://phpackages.com/badges/theodorejb-iis-log-parser/health.svg)](https://phpackages.com/packages/theodorejb-iis-log-parser)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
