https://github.com/orkan/tlc
Simple PHP/cURL/FlareSolverr framework with Logger, Cache and more!
https://github.com/orkan/tlc
crawler curl flaresolverr net scrap
Last synced: 5 months ago
JSON representation
Simple PHP/cURL/FlareSolverr framework with Logger, Cache and more!
- Host: GitHub
- URL: https://github.com/orkan/tlc
- Owner: orkan
- License: mit
- Created: 2025-03-03T23:49:48.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-04-05T15:41:44.000Z (10 months ago)
- Last Synced: 2025-08-17T17:14:03.985Z (5 months ago)
- Topics: crawler, curl, flaresolverr, net, scrap
- Language: PHP
- Homepage:
- Size: 230 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.txt
- License: LICENSE
Awesome Lists containing this project
README
# TLC - Transport, Logging, Cache `v3.1.0`
Simple PHP/cURL/FlareSolverr framework with Logger, Cache and more!
## Installation
`$ composer require orkan/tlc`
## Usage
```php
// Setup
use Orkan\TLC\Application;
use Orkan\TLC\Factory;
use Symfony\Component\DomCrawler\Crawler;
require __DIR__ . '/vendor/autoload.php';
$Factory = new Factory( require __DIR__ . "/cfg.php" );
$Application = new Application( $Factory );
$Application->run();
// GET page
$html = $Factory->Transport()->get( $url = 'http://example.com/welcome.php' );
$Crawler = new Crawler( $html );
// Fill & POST "Log in" FORM
$fields = $Crawler->filter( '#form-login' )->form()->getValues();
$fields['user'] = 'Me';
$fields['pass'] = 'secret';
$Factory->Transport()->post( $url, [ 'fields' => $fields ] );
// Log some info...
$Factory->Logger()->info( 'Form fields: ' . print_r( fields, true ) );
```
For more examples see [`/demo`](/demo) folder.
## About
### Requirements
PHP ^7.4
## Third Party Packages
* [Seldaek/Monolog](https://github.com/Seldaek/monolog)
* [Symfony/DomCrawler](https://symfony.com/doc/current/components/dom_crawler.html)
### Author
[Orkan](https://github.com/orkan)
### License
MIT
### Updated
Fri, 11 Apr 2025 17:55:30 +02:00