Package Data | |
---|---|
Maintainer Username: | hamway |
Maintainer Contact: | hamway0611@gmail.com (Evgeny Anoykin) |
Package Create Date: | 2014-10-20 |
Package Last Update: | 2015-07-23 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 03:13:45 |
Package Statistics | |
---|---|
Total Downloads: | 36 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Author: Evgeny Anoykin hamway0611@gmail.com
A Laravel Curl library for get content via proxy or direct (support random user agents, random interval between requests).
Require this package with composer using the following command:
composer require hamway/lcurl
After updating composer, add the service provider to the providers array in config/app.php
'Hamway\LCurl\LCurlServiceProvider',
And alias
'LCurl' => 'Hamway\LCurl\Facades\LCurl',
After install library ready to use. But may be configure. For publish package config use command:
php artisan config:publish hamway/lcurl
Package configuration file example:
return array(
'timeout' => 50, // Max curl timeout
'userAgent' => true, // Generate useragent
'sleep' => [ // pause between requests in seconds
'min' => 0,
'max' => 0
],
'proxy' => false, // use proxy
'proxyList' => [ // proxy list
'118.97.194.49:8080'
]
);
Build url for request:
LCurl::buildUrl($url, array $query)
Get page content:
LCurl::get($url)
Get image from page (saveTo - path to image if need save):
LCurl::getImage($url, $saveTo)
lcurl is offered under the MIT license. See the LICENSE file.