Hi all,

I have been asked to create an API for a website, which I would like to do, but havent done before.

Does anyone have a good tutorial on using procedural style php, integrated with REST to make an API work?

I have read that REST is really good and "easy" to learn.

So hopefully someone can point me in a direction on how I can solve/learn to integrate an API on this site :-)

Good day everyone,

Klemme

Thanks, Ill have a look at your work.

It is for a webshop, thats wants to display products (The shop sells audio books, from a really big retailer), and the shop owner wants to list the items through this API, so potentiel customers can see them, and download them via the webshop.

And I was asked to set it up, which I gladly do, just have to learn it :-)

I obviously want to make it as basic as possible, an still make it work good and properly off course.

So basic question for an API comes here:
1)
I have to connect to their server, right?
2)
They have an API/"interface" allready build, which I connect to/use to retreive data from?
3)
To show the data in the webshop, I can put them in a variable and echo it out or?

More question to follow.. ;-)

Klemme

Okay, I may have missed something here. Are you requesting information on how to build an API (as per the OP), or information on how to use an existing one ?

I am trying to find out via the customer if one should be build or using an existing one..

Lets say the company he sells the audio books from, have an API - Then thats what I use isnt it? I connect to that and retrieve the data onto the webshop somehow?

Sorry if the questions are vague, as I havent made an API/nor used an existing one before

Yes, if they have an API, you can use that.

Developers should not be so abstract and other PDO / prepared statement paralysis them to achieve a false sense of security layers. Unreliable data should always be verified and disinfection, DOP is another line of defense.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.