PHPackages                             ronnie/tra-crawler - 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. ronnie/tra-crawler

ActiveLibrary

ronnie/tra-crawler
==================

A package to crawl TRA web receipts and return the data in necessary format

v1.0.0-beta.2(2y ago)3452proprietaryHTMLPHP &gt;=8.1

Since Oct 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/RonnieTaz/tra-crawler)[ Packagist](https://packagist.org/packages/ronnie/tra-crawler)[ RSS](/packages/ronnie-tra-crawler/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (10)Versions (5)Used By (0)

[![Logo](https://camo.githubusercontent.com/30aaf33fd449fb46eb87c200068980a9c9b4e057561fae74bb4b380539295212/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f545241253230437261776c65722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726f6e6e69652532467472612d637261776c6572267061747465726e3d676c616d6f726f7573267374796c653d7374796c655f31266465736372697074696f6e3d5048502b6c6962726172792b746f2b637261776c2b5452412b4546442b7265636569707473266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d726563656970742d746178)](https://camo.githubusercontent.com/30aaf33fd449fb46eb87c200068980a9c9b4e057561fae74bb4b380539295212/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f545241253230437261776c65722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d726f6e6e69652532467472612d637261776c6572267061747465726e3d676c616d6f726f7573267374796c653d7374796c655f31266465736372697074696f6e3d5048502b6c6962726172792b746f2b637261776c2b5452412b4546442b7265636569707473266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d726563656970742d746178)

TRA Crawler
===========

[](#tra-crawler)

A PHP package for crawling TRA receipts and returning its data as a collection, array or json.

Badges
------

[](#badges)

Add badges from somewhere like: [shields.io](https://shields.io/)

[![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://choosealicense.com/licenses/mit/)

Installation
------------

[](#installation)

Install TRA crawler with composer.

```
  composer require ronnie/tra-crawler
```

The project also make use of puppeteer to access JS content on the receipt.

```
  npm install puppeteer
```

Authors
-------

[](#authors)

- [@RonnieTaz](https://www.github.com/RonnieTaz)

Usage/Examples
--------------

[](#usageexamples)

### Plain PHP

[](#plain-php)

When using this package in plain PHP, a simple setup like this can help you get started:

```
  use Ronnie\TRA\Crawler;

  ...

  $crawler = new Crawler();
  // For URI or QR Scanned receipts you can use the URI method
  $receipt = $crawler->setUri($yourURI)->crawl();

  // For Physical receipt, Receipt verification code and the time is to be used in conjuction with the code method
  $receipt = $crawler->setCode($yourCode, $yourTime)->crawl();
```

Do note that the time (`$yourTime`) should be in `hhMMss` format (124453).

### Laravel / Dependency Injection

[](#laravel--dependency-injection)

When using this package in a Laravel/Symfony Project or any project that has a DI container, a better solution would be to use the container to inject an instance of the `Ronnie\TRA\Crawler` class into whatever class or method you need. A singleton works best for such scenarios.

It is also possible to extend the `Ronnie\TRA\Crawler` class or write your own implementation as long as they obey the `Ronnie\TRA\Contracts\ResourceCrawler` contract/interface.

Run Locally
-----------

[](#run-locally)

Clone the project

```
  git clone https://github.com/RonnieTaz/tra-crawler
```

Go to the project directory

```
  cd tra-crawler
```

Install NPM dependencies

```
  npm install puppeteer
```

Install Composer dependencies

```
  composer install
```

Use CLI app to test output

```
  php bin/console app:test-output -i url -u the_receipt_url
```

Also, few sample receipts have been added to the project to simplify testing. Head over to `config.php` to set which sample you want to use.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

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

Total

4

Last Release

938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d65344ea728358f625de8a09918fdec3dfff8ed2faf03da7fd61bf57403cd40?d=identicon)[RonnieTaz](/maintainers/RonnieTaz)

---

Top Contributors

[![RonnieTaz](https://avatars.githubusercontent.com/u/67832502?v=4)](https://github.com/RonnieTaz "RonnieTaz (16 commits)")

---

Tags

crawlerefdphptra

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ronnie-tra-crawler/health.svg)

```
[![Health](https://phpackages.com/badges/ronnie-tra-crawler/health.svg)](https://phpackages.com/packages/ronnie-tra-crawler)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2021.0M277](/packages/drupal-core-dev)[spatie/laravel-visit

Quickly visit any route of your Laravel app

15614.6k](/packages/spatie-laravel-visit)

PHPackages © 2026

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