[BEST WAY] Connect API WebService |
[eluser]daweb[/eluser]
Hi there, just like on the 3d title. In your experience which is the best way to connetc External API WebServices using CodeIgniter? I would like to try CURL? Is it the right choise? And what about relative use of Curl with CI? Anybody can help me on this? Thank you.
[eluser]_xammax_[/eluser]
Hi, probably the right choise depends from which type of webservice you need to interface with. CI support directly XML-RPC (http://ellislab.com/codeigniter/user-gui...mlrpc.html), but you can easy implements other solutions ... curl and php fsockopen too :-) Curl is very easy to use, you can find a lot of example code for its implementation in CI (for example look at the php code of any type of twitter lib for CI). :-)
[eluser]pickupman[/eluser]
I find using a cache library for webservices helpful. I used Phil Sturgeon's cache library linked in my signature. He also has a REST library as well posted for CI for connecting to webservices. For simple get requests, I have simply used curl, and cache the results for whatever time period seems appropriate for the data. This will make the pages a little faster, as it doesn't have to wait for a response every page load.
|
Welcome Guest, Not a member yet? Register Sign In |