infostars/net-curl

Simple curl wrapper

Installs: 9 460

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 1

pkg:composer/infostars/net-curl

dev-master 2018-10-08 18:47 UTC

This package is auto-updated.

Last update: 2025-10-09 15:02:25 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!