We help IT Professionals succeed at work.

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

ltpitt
ltpitt asked
on
188 Views
Last Modified: 2016-01-22
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
Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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 DoschkeSoftware Developer
CERTIFIED EXPERT

Commented:
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 BradyPrincipal Data Engineer
CERTIFIED EXPERT

Commented:
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)

Author

Commented:
@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 DoschkeSoftware Developer
CERTIFIED EXPERT

Commented:
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.
Most Valuable Expert 2011
Author of the Year 2014

Commented:
Wow, what did we do wrong?  Why did you give a marked-down grade?

Author

Commented:
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.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.