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
Post a Comment