30 5

Codeigniter Curl

Use <a href="">Codeigniter Curl library</a> to parse data in JSON format.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
$this->load->library('Curl'); $url = ''; $formatJsondata = array(    'username' => 'authenticate-username',    'password' => 'password-authentication' ); $encodedJsonData = json_encode($formatJsondata); $this->curl->create($url); $this->curl->option(CURLOPT_HTTPHEADER, array('Content-type: application/json; Charset=UTF-8')); $this->curl->post($encodedJsonData); echo $result = $this->curl->execute();
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus