简体   繁体   中英

How to setup my own XML API server?

I run a LAMP based web server, and it would be useful to have an API.

Basically I need a script that can receive requests by GET or POST, authenticate against a list of auth users, run a mysql query and return results in XML.

Before reinventing the wheel by starting such script from scratch, I was wondering if there is a PHP class or base script I could use as starting point.

Thanks for any assistance

I would personally recommend you use slim framework , It's a very lightweight but thorough framework which would help you achieve what you need. It integrates into any script and easily supports authentication through the slim-extras auth middleware.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM