orkan / tlc
Simple PHP/cURL (T)ransport framework with (L)ogger, (C)ache and more!
3.0.0
2025-03-26 16:04 UTC
Requires
- php: ^7.4
- orkan/utils: ^11.2
Requires (Dev)
- monolog/monolog: ^2.9
- phpunit/phpunit: ^9.6
README
Simple PHP/cURL/FlareSolverr framework with Logger, Cache and more!
Installation
$ composer require orkan/tlc
Usage
// 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
folder.
About
Requirements
PHP ^7.4
Third Party Packages
Author
License
MIT
Updated
Wed, 26 Mar 2025 17:04:39 +01:00