PHPackages                             mwgg/iracing-php - 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. mwgg/iracing-php

ActiveLibrary

mwgg/iracing-php
================

iRacing Data API wrapper for PHP

v1.6.0(2y ago)64825MITPHPPHP &gt;=7.4

Since Jun 24Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mwgg/iracing-php)[ Packagist](https://packagist.org/packages/mwgg/iracing-php)[ RSS](/packages/mwgg-iracing-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

iracing-php
===========

[](#iracing-php)

iRacing Data API wrapper for PHP. API documentation and additional information can be found on the [iRacing Forums](https://forums.iracing.com/discussion/15068/general-availability-of-data-api/p1).

Basic usage
-----------

[](#basic-usage)

Install with composer:

```
composer require mwgg/iracing-php

```

The names of all API services and methods match their API endpoints.

API Documentation excerpt:

```
"stats": {
    "member_summary": {
        "link": "https://members-ng.iracing.com/data/stats/member_summary",
        "parameters": {
            "cust_id": {
                "type": "number",
                "note": "Defaults to the authenticated member."
            }
        }
    }
}
```

iRacingPHP:

```
use iRacingPHP\iRacing;
$iracing = new iRacing('your@login.com', 'iRacingPassword');
$summary = $iracing->stats->member_summary();
```

Note that the `cust_id` parameter is optional in this case, thus may be omitted. All parameters that are denoted as required by the API documentation must be passed as separate parameters to the API method, optional parameters are grouped into a separate array parameter. This makes it easier to deal with methods that have a large number of optional parameters.

API Documentation excerpt:

```
"league": {
    "season_standings": {
        "link": "https://members-ng.iracing.com/data/league/season_standings",
        "parameters": {
            "league_id": {
                "type": "number",
                "required": true
            },
            "season_id": {
                "type": "number",
                "required": true
            },
            "car_class_id": {
                "type": "number"
            },
            "car_id": {
                "type": "number",
                "note": "If car_class_id is included then the standings are for the car in that car class, otherwise they are for the car across car classes."
            }
        }
    }
}
```

iRacingPHP:

```
use iRacingPHP\iRacing;
$iracing = new iRacing('your@login.com', 'iRacingPassword');
$standings = $iracing->league->season_standings(12345, 54321, [
    'car_id' => 123
]);
```

Rate Limits
-----------

[](#rate-limits)

After making a request it is possible to check current rate limit values.

```
$iracing->api->rateLimits->limit; // The current total rate limit
$iracing->api->rateLimits->remaining; // How much of the rate limit you have remaining
$iracing->api->rateLimits->reset; // When the rate limit will reset in epoch timestamp
```

Note that these rate limit values will update after all requests, *except* the `$iracing->constants->` endpoints, since those are retrieved locally.

Cookies
-------

[](#cookies)

iRacingPHP makes use of cookies to persist authentication between requests and executions. By default, cookies are stored in `/tmp/iracingphpcookie`.

If you wish to change the location of the cookie file, you may do so when instantiating the iRacing object:

```
$iracing = new iRacing('your@login.com', 'iRacingPassword', '/path/to/cookies');
```

As long as the same path is used across all requests and executions, authentication will persist.

Exceptions
----------

[](#exceptions)

iRacingPHP throws the following exceptions:

`iRacingPHP\Exceptions\ApiServiceNotFoundException` is thrown when attempting to access a non-existent API service.

`iRacingPHP\Exceptions\AuthenticationRequestFailedException` is thrown when authentication request fails for any reason.

`iRacingPHP\Exceptions\AuthenticationFailedException` is thrown when the authentication HTTP request succeeded but authentication did not happen (wrong username or password, etc).

`iRacingPHP\Exceptions\RequestFailedException` is thrown when the API endpoint request fails.

`iRacingPHP\Exceptions\DataRequestFailedException` is thrown when a request to retrieve cached data fails.

`iRacingPHP\Exceptions\RequestRateLimitedException` is thrown when a request failed due to rate limiting.

`iRacingPHP\Exceptions\SiteMaintenanceException` is thrown when iRacing services are down for maintenance.

In all cases you can view the error message using `$e->getMessage();`

In all cases but the `iRacingPHP\Exceptions\ApiServiceNotFoundException` exception, the parent Guzzle exception is chained with the iRacingPHP exception.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

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 ~60 days

Total

8

Last Release

994d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.3

v1.4.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/01099dd8b806dfea9b37d170e3c561ffdb3f189ff882d3d3722509e179e80b9f?d=identicon)[mwgg](/maintainers/mwgg)

---

Top Contributors

[![mwgg](https://avatars.githubusercontent.com/u/7067976?v=4)](https://github.com/mwgg "mwgg (13 commits)")

### Embed Badge

![Health badge](/badges/mwgg-iracing-php/health.svg)

```
[![Health](https://phpackages.com/badges/mwgg-iracing-php/health.svg)](https://phpackages.com/packages/mwgg-iracing-php)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)

PHPackages © 2026

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