Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
03-12-2013, 08:44 PM #1
PHP and API's: Need a Decent Tutorial
At this point I am relatively familiar with PHP and using it within the same domain / server, but I want to start learning how to work with API's so that I can increase the capabilities of my websites. Can anyone give me a good starting point for learning this stuff? Will I have to learn Zend Framework (because it seems that several API's or tutorials use it? Will I have to learn cURL first?
Also will I be able to implement this stuff if my website is on a shared server? Because on some tutorials it looked like I'd have to tamper with Linux / Unix stuff.
Any help would be great. A sort of "API's for Dummies" would be great (assuming it was well-written). Thank you.
03-12-2013, 09:09 PM #2
- Join Date
- Feb 2011
- Your Monitor
- Thanked 537 Times in 524 Posts
I don't think there is any such tutorial on APIs. Most external websites (eg paypal) offer their own custom API and instructions on how to use it. This is different for any company that has its own API so you're not going to find a one-size-fits-all tutorial. Most of these companies will offer you an example of how to use their API though.
As for cURL, yes you'll probably need to learn to use it but it really isn't that hard. If you're able to use and understand the php.net manual, then the php.net cURL manual is just as easy to understand. It's about calling a few functions, passing the correct parameters (which php.net has a list of) and then executing the request. There is nothing overly complex about it but if you don't get to grips with it easily, there are always user comments on php.net and plenty of samples on google!
See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/
Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!
Users who have thanked tangoforce for this post: