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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    166
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Wanted to understand What will be API

    Hi Friends,

    I am back with another point of discussion.These time I wanted to know what is API really means in technical or practical terms? .....i know its theoretical definition is "Application programming interface". But, I wanted to see some good examples or theories how they really work. For instance i am new with PHP and if some one says API how should I understand & react to it as a PHP developer.

    I wanted to clear up this doubt because where I working currently every one uses only API language ...and being technical & Service delivery manager I don't know how really it works... of course I also keep referring API language with out knowing any pinpoint of it coz my client dose the same even I need to, Funny rite...so, At this point I don't want to be a dumb crackling guy in front of them. on the same reason I have started learning PHP and now I want to deep down in to it step by step.

    Any write ups or discussion?

    I am really happy to discuss on this...

    Regards,
    Nani
    Last edited by nani_nisha06; 11-17-2012 at 05:32 PM.

  • #2
    Regular Coder Redcoder's Avatar
    Join Date
    May 2012
    Location
    /dev/null
    Posts
    333
    Thanks
    2
    Thanked 47 Times in 46 Posts
    Google is your friend.

    But look at the following links:

    http://en.wikipedia.org/wiki/Applica...ming_interface

    http://www.quora.com/APIs/What-is-an...n-layman-terms

    http://www.wisegeek.com/what-is-an-api.htm

    http://www.computerworld.com/s/artic...ming_Interface


    Anybody can build there own simple API's. For example:

    PHP Code:
    <?php

    //http://jayctech.com/pics.php

    if(isset($_GET['user_id']))
    {
    //Queries to get user name, picture from mysql database

    echo "$picture_location";

    }
    At the page that requested the picture, have the following code.(I've made it very long with unnecessary code to make it easily understandable).

    PHP Code:
    <?php
    $pic_location 
    file_get_contents('http://jayctech.com/pics.php?id=2');
    ?>

    <html>
    <body>
    <img src="<?=$pic_location?>" />
    </body>
    </html>

  • Users who have thanked Redcoder for this post:

    nani_nisha06 (11-19-2012)

  • #3
    Regular Coder
    Join Date
    Oct 2012
    Location
    mother land --india
    Posts
    166
    Thanks
    38
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Redcoder View Post
    Google is your friend.

    But look at the following links:

    http://en.wikipedia.org/wiki/Applica...ming_interface

    http://www.quora.com/APIs/What-is-an...n-layman-terms

    http://www.wisegeek.com/what-is-an-api.htm

    http://www.computerworld.com/s/artic...ming_Interface


    Anybody can build there own simple API's. For example:

    PHP Code:
    <?php

    //http://jayctech.com/pics.php

    if(isset($_GET['user_id']))
    {
    //Queries to get user name, picture from mysql database

    echo "$picture_location";

    }
    At the page that requested the picture, have the following code.(I've made it very long with unnecessary code to make it easily understandable).

    PHP Code:
    <?php
    $pic_location 
    file_get_contents('http://jayctech.com/pics.php?id=2');
    ?>

    <html>
    <body>
    <img src="<?=$pic_location?>" />
    </body>
    </html>
    redcoder,

    Well I am looking at your example and reading articles shared by you.

    let me write back my views.

    Regards,
    Nani


  •  

    Posting Permissions

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