Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder d'Anconia's Avatar
    Join Date
    Jan 2010
    Location
    Tempe, AZ
    Posts
    149
    Thanks
    16
    Thanked 6 Times in 6 Posts

    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.
    Datagonia Web (My Portfolio)

    Powerful ideas for all lovers of personal and political freedom:
    Freedomain Radio
    Free Talk Live

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,352
    Thanks
    61
    Thanked 528 Times in 515 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:

    d'Anconia (03-15-2013)


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •