tags:

views:

94

answers:

1

How to create PHP post\get API? So tooday I have crapy mix of PHP and HTML and JS. I need to open some of functions I use in my site to Developers so thay will be able to use my site data in their APP's. What is the EAZY LAZY and PROTECTED at the same time way to do such thing?

+1  A: 

EASY/LAZY: Just publish URLS/parameters for the functions and sit back and watch the melee

EASY/PROTECTED: Publish URLS/parameters, but require a valid authentication token of some sort (one function could be a login to establish credentials), plus potentially restricted access to certai IPs/netblocks

LAZY/PROTECTED: Publish URLS/parameters and use Apache Basic authentication to protect the scripts. Give out either per-user user/pw pairs, or a small set of common u/p pairs.

EASY/LAZY/PROTECTED: Ah, if only...

Marc B