PHPackages                             mauserrifle/simresults - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mauserrifle/simresults

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mauserrifle/simresults
======================

Simrace result reader for PHP

v0.20.0(1y ago)664.8k23[13 issues](https://github.com/mauserrifle/simresults/issues)ISCPHPCI failing

Since Jun 2Pushed 9mo ago21 watchersCompare

[ Source](https://github.com/mauserrifle/simresults)[ Packagist](https://packagist.org/packages/mauserrifle/simresults)[ Docs](http://simresults.net)[ GitHub Sponsors](https://github.com/mauserrifle)[ RSS](/packages/mauserrifle-simresults/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (40)Used By (0)

Simresults
==========

[](#simresults)

[![Minimum PHP Version](https://camo.githubusercontent.com/1e3b70374ce5a22774aa3385ec7b561e59b8f8c6a75da5d41cb46fcbe55e6a8b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e332d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![CI Status](https://github.com/mauserrifle/simresults/actions/workflows/ci.yml/badge.svg)](https://github.com/mauserrifle/simresults/actions)[![Total Downloads](https://camo.githubusercontent.com/e7ef1902cd6c32d2efb6c8ba69ea7ebac5c19beed99f09a7dff8dfc6eac1043a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61757365727269666c652f73696d726573756c7473)](https://packagist.org/packages/mauserrifle/simresults)[![License](https://camo.githubusercontent.com/cbd9ab4d14946a5f1f7dc2ce05b5d5ed7aca47c17b4ebef9c3e3e5081422d969/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d61757365727269666c652f73696d726573756c7473)](https://raw.githubusercontent.com/mauserrifle/simresults/develop/LICENSE)

Simresults is an open-source, object-oriented library built using PHP. It allows you to read out log files of a race game and transforms them to a simple data model to easily read out this data.

This project is the core of the website [simresults.net](http://simresults.net), which allows you to upload your race log files and transform them to a readable format. The uploaded results become saved and public, so visitors can share them with their fellow racers. An example result can be found at .

The website is a service but also a demonstration of what is possible using this library. This library does not supply any HTML templates or whatsoever. Any 'implementation' is up to you within your own project and is not limited to any framework.

This project is created (2013) and maintained by [Maurice van der Star](https://github.com/sponsors/mauserrifle)

Please consider [donating](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L9L982XNK7DAA&lc=US&item_name=Simresults&item_number=Simresults&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)to cover future development.

It's also possible to use the Simresults website remote results [API](https://simresults.net/api). This requires much less work and programming knowledge.

- Website: [simresults.net](https://simresults.net)
- Twitter (inactive): [@simresults](http://twitter.com/simresults) and [@mauserrifleNL](http://twitter.com/mauserrifleNL)
- Email:
- Donate: [Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L9L982XNK7DAA&lc=US&item_name=Simresults&item_number=Simresults&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
- Sponsor: [GitHub](https://github.com/sponsors/mauserrifle) (please email me for alternatives)

Sponsors
--------

[](#sponsors)

Big thanks to the following sponsors for supporting Simresults! Please pay them a visit :)

- [XCL - Simracing for PS5 &amp; Xbox S/X](https://www.xboxcommunityleague.com/?ref=simresults)

Supported games
---------------

[](#supported-games)

Simresults supports a wide range of games:

- rFactor
- rFactor 2
- Project Cars
- Project Cars 2
- Assetto Corsa
- Assetto Corsa Competizione
- Automobilista
- Automobilista 2
- Game Stock Car 2012
- Game Stock Car 2013
- Game Stock Car Extreme
- Formula Truck 2013
- RACE
- RACE 07
- GTR
- GTR2
- GT Legends
- RaceRoom Racing Experience
- BMW M3 Challenge
- F1 challenge 99-02

The following expansions of RACE (07) should work too:

- Race: Caterham expansion
- GTR Evolution
- Crowne Plaza
- STCC - The Game
- STCC 2 - The Game
- RACE On
- Raceroom - The Game
- Raceroom - The Game 2
- Formula Raceroom
- GT Power
- WTCC 2010
- Retro
- Race Injection
- Volvo - The Game

Please note that Formula Truck will be reported as as a rFactor game.

Results from F1 challenge and GTR might miss laps.

Results from Assetto Corsa (race\_out.json) and Raceroom might only contain 1 lap.

Features
--------

[](#features)

- Can read out a full session consisting of the following information: Game, Server, Settings, Track, Participants/Drivers including swaps, Vehicle, Compound choice, Chats, Laps/Sectors, Fuel usage, Pit info, Penalties and Incidents
- Offers extra methods to get specific data, e.g. `getBestLap()` and `getBestLapBySector()`
- Offers a Helper class to sort laps by time and format times to human readable format (`h:i:s.u`)
- Caches heavy methods like `getLapsSortedBySector()`. This is very useful with endurance results that have 200+ laps
- The API is unittested

### rFactor reader

[](#rfactor-reader)

`lib/Data/Reader/Rfactor2.php`

- Supports rFactor and rFactor 2. Also works for other rFactor powered games: Automobilista, Game Stock Car 2012, Game Stock Car 2013 and Formula Truck 2013
- Detects and fixes position data (sometimes log files report complete wrong positions due to lag/bugs)
- Detects human and AI players using their aids (sometimes log files report wrong player state)

### Project Cars Server reader

[](#project-cars-server-reader)

`lib/Data/Reader/ProjectCarsServer.php`

### Assetto Corsa reader

[](#assetto-corsa-reader)

`lib/Data/Reader/AssettoCorsa.php`

- Limited data. Use server logs if possible.

### Assetto Corsa Server reader

[](#assetto-corsa-server-reader)

`lib/Data/Reader/AssettoCorsaServer.php`

### Assetto Corsa Server reader JSON

[](#assetto-corsa-server-reader-json)

`lib/Data/Reader/AssettoCorsaServerJson.php`

### Assetto Corsa Competizione

[](#assetto-corsa-competizione)

`lib/Data/Reader/AssettoCorsaCompetizione.php`

### RaceRoom Server reader

[](#raceroom-server-reader)

`lib/Data/Reader/RaceRoomServer.php`

### RACE 07 reader

[](#race-07-reader)

`lib/Data/Reader/Race07.php`

- Also works for the following games: RACE, GTR, GTR2, GT Legends, BMW M3 Challenge, F1 challenge 99-02 and all expansions of these games
- Checks and fixes log variations like non-zero based laps and missing lap data

### iRacing reader

[](#iracing-reader)

`lib/Data/Reader/Iracing.php`

- Limited data. Only contains the best lap of drivers.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.3
- Composer (for easy installing and autoloading)

Installation and example
------------------------

[](#installation-and-example)

Simresults can be installed and autoloaded using [composer](https://packagist.org). But ofcourse it will work with any [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)autoloader.

### Example for Linux/OSX

[](#example-for-linuxosx)

[Install composer](https://getcomposer.org/download/).

Add the Simresults package to the `composer.json` file:

```
composer require mauserrifle/simresults:dev-develop

```

Create index.php:

```
