php - Native cURL with CI -


how can use native curl in server instead curl library in codeigniter? have curl code made in native curl in php, want implement ci ci doesn't recognize action want.

you can use guzzel or response

both of have pretty extensive documentation & support

example guzzel

$client = new guzzlehttp\client(); $res = $client->get('https://api.github.com/user', ['auth' =>  ['user', 'pass']]); echo $res->getstatuscode(); // "200" echo $res->getheader('content-type'); // 'application/json; charset=utf8' echo $res->getbody(); // {"type":"user"...' 

Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -