infostars / net-curl
Simple curl wrapper
Installs: 6 941
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 1
Requires
- php: >=5.4.0
- ext-curl: *
This package is auto-updated.
Last update: 2024-12-09 13:17:02 UTC
README
Fase start
$curl = new curl();
$curl->prepare('https://github.com');
$content = $curl->execute();
Some tricks
$curl = new curl();
$curl->useProxy('1.2.3.4:3128', 'http');
$curl->setConnectionTimeout(10);
$curl->setTimeout(15);
$curl->setCookieFile('/custom/cookie/file');
$curl->addOptions([
CURLOPT_USERAGENT => 'Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16'
]);
$curl->prepare('https://github.com/search', ['q' => 'InfoStars LLC', 'type' => 'Users')
$content = $curl->execute();
Enjoy!