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

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -