Avatar of ltpitt
ltpitt asked on

Suggestions to build quickly and efficiently a PHP rest interface that works in shared hosting with only FTP access

Hi everyone!

I just have a tiny DB with two tables and I would like to build a tiny REST api to that will handle insert / retrieve / update / delete.

Nothing fancy at all, I'd just need speed and simplicity and the chance to quickly upload it to FTP access without long setting of environment.

What is your suggestion to implement this?

Even a simple jot of an idea or a framework suggestion is enough to give me a big help, no need for specific code.

Kind regards
DatabasesPHPREST

Avatar of undefined
Last Comment
ltpitt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
ltpitt

Lumen is fantastic for the job but it will be an hassle to setup the server, just having FTP access.
There are a few tutorials on the topic but they all look hacky and painful.
I will quickly check the other solution and provide feedback soon :)
Olaf Doschke

First google result, I think it's quite neat:

https://www.leaseweb.com/labs/2015/10/creating-a-simple-rest-api-in-php/

What complexity level do you have in mind? Eg this states in itself it's not written for anything needing joined data. In your two table case you might or might not need joins at all, you might only need another way of sending in foreign key instead of primary key, so you can get related data.

The first thoughts should be about the url pattern you need to provide your functionality, then the REST follows ;).

Bye, Olaf.
Mark Brady

If you only have FTP access you will need your hosting company to setup the database and tables according to your needs and give you the host name, username and password to access it.

Usually with even shared hosting you can go to your dashboard and set these things up yourself which is the only was I would ever consider a shared hosted account. FTP is used to upload any code changes you have made (your website)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER
ltpitt

@Mark

I have access to phpmyadmin and ftp

I am asking about microframeworks to easily and quickly develop a simple api service (keeping in mind the above constrictions)

Thanks for your help!
Olaf Doschke

Well, Mark, even without phpmyadmin you can execute PHP scripts uploaded by FTP, that create tables. Cumbersome, but quite a normal setup in olden times, where we even didn't have phpmyadmin or anything like plesk or even ssh access to simply hosting webspace with a given MySQL database.

Bye, Olaf.
Ray Paseur

Wow, what did we do wrong?  Why did you give a marked-down grade?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
ltpitt

Even if the answers are somewhat correct are simply the fruit of a google search and no added guidance was provided.
In the request I was looking for:
Nothing fancy at all, I'd just need speed and simplicity and the chance to quickly upload it to FTP access without long setting of environment.

I am not complaining but...
All I got was "might be useful" and "never tried it"

An A grade solution is an A grade solution :)

No offense at all, I follow your answers and I think that you are a true myth in the community.