Welcome Guest, Not a member yet? Register   Sign In
[BEST WAY] Connect API WebService
#1

[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.
#2

[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).

:-)
#3

[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.
#4

[eluser]daweb[/eluser]
Thank you yours reply.




Theme © iAndrew 2016 - Forum software by © MyBB