Calling an external API |
[eluser]RaBu[/eluser]
Hi, I'm new to CodeIgniter, I'm currently writing a simple PHP powered webapp using CodeIgniter (I'm really amazed over the simplicity and power of this cool framework). My question is: How do I send a HTTP GET (or POST) to an external URL in a Controller or Model (with out sending it to a view). E.g.: I want to call an external API (using HTTP GET or POST), then i construct my URL (http:// api.example.com/DoStuff?action=someThing&key=XXXX&whatEver=someThingElse) after that I want to fire it off, read the response and then forward to a relevant view. I hope one of you more experienced CodeIgniter guys can help me, with a point in the right direction ![]() Kind regards, Rasmus
[eluser]RaBu[/eluser]
Thanks for the tip, I just found this Curl-lib for CodeIgniter: http://alexpolski.com/category/curl-library/ (http://codeigniter.com/wiki/Curl_library/) I will just check it out, sound like that's what i need ![]() - Ras |
Welcome Guest, Not a member yet? Register Sign In |