Page 1 of 1

PHP <> API

Posted: Fri Jun 03, 2005 5:41 am
by malcolmboston
Havent really looked into it yet but i was told at work yesterday that we will now be getting all our data through an available API to us, basically im looking to find ways of reading, communicating and utilising API's with PHP.

can anyone provide me with some links please?

Thanks

Posted: Fri Jun 03, 2005 7:39 am
by malcolmboston
bump

Posted: Fri Jun 03, 2005 9:01 am
by patrikG
Not wanting to sound flippant, but that depends entirely on the API. Any application has, per definitionem, an Application Program Interface.

Posted: Fri Jun 03, 2005 9:22 am
by Roja
An API can be anything.

It could be as simple (but hard to use) as "Scrape the html of the webpage, and do with it what you will".

It could be as complex (but easy to use) as "We will send all data via XML on a specific port using a specific DTD".

It could even entail SOAP, socket communications, or even email. It all depends on the application.

When people say they will give you an API, they usually mean "We are going to be consistent about how my app will communicate with your app", which is an excellent start. Of course, from there..

Posted: Fri Jun 03, 2005 9:25 am
by malcolmboston
ah, ok cool

I was just a little worried as we are no longer going to be getting our data from a database but from a 3rd party API with millions of pieces of data and i have not worked directly with API's before so was a little 'scared'

Posted: Fri Jun 03, 2005 11:04 am
by phpScott
with a lot of luck you will get some good documentation on how to use the API.

with a little luck you will get some documentation on how to use the API.

or with no luck you will get **** all and only a phone number to call on how to use the API and the person on the other end doesn't speak english as their native tongue. (makes communicating complex ideas difficult).

I working with the third at the moment. :(

Posted: Fri Jun 03, 2005 3:40 pm
by McGruff
Can you count on a consistent API? You could have a big problem if it changes regularly with a lot of code to update each time. You can isolate this by encapsulating the API (Adapter? Or Facade? I keep getting them mixed up) so that at least you just have one class to edit rather than the entire code base.