Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do that by cURL. Just download the codeIgniter cURL library from here </p> <p><del><a href="http://getsparks.org/packages/curl/show" rel="nofollow noreferrer">http://getsparks.org/packages/curl/show</a></del> <b>(Dead Link)</b></p> <p><a href="https://github.com/philsturgeon/codeigniter-curl" rel="nofollow noreferrer">https://github.com/philsturgeon/codeigniter-curl</a> <b>(Update Link - Git Repo)</b></p> <p>Put this library file in the <code>libraries</code> folder.</p> <p>So now in the Controller -</p> <pre><code>public function auth_with_api() { $this-&gt;load-&gt;library('curl'); $user_email = "jondoe@appsapi.com.au" $api_key = $this-&gt;curl-&gt;simple_get('https://www.sample.com.au/api/apps/auth{$user_email}'); // $api_key now get the value A9D5w9pL // now you can use this $api_key in this controller. } </code></pre> <p><br/> <b>Edit (Another way) - </b><br/><br/> Now you can use <b>Guzzle</b>. It is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services.</p> <p>Please check out the <b>Guzzle Documentation</b> - <a href="http://docs.guzzlephp.org" rel="nofollow noreferrer">http://docs.guzzlephp.org</a> <br/></p> <pre><code>public function auth_with_api() { $user_email = "jondoe@appsapi.com.au" $client = new \GuzzleHttp\Client(); $resposne = $client-&gt;request('GET', 'https://www.sample.com.au/api/apps/auth{$user_email}'); $api_key = $resposne-&gt;getBody(); // $api_key now get the value A9D5w9pL } </code></pre> <p>If you have any problem. Please let me know.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload