...

View Full Version : Wanted to understand What will be API



nani_nisha06
11-17-2012, 06:29 PM
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

Redcoder
11-18-2012, 09:43 AM
Google is your friend.

But look at the following links:

http://en.wikipedia.org/wiki/Application_programming_interface

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

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

http://www.computerworld.com/s/article/43487/Application_Programming_Interface


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



<?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
$pic_location = file_get_contents('http://jayctech.com/pics.php?id=2');
?>

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

nani_nisha06
11-19-2012, 06:54 PM
Google is your friend.

But look at the following links:

http://en.wikipedia.org/wiki/Application_programming_interface

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

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

http://www.computerworld.com/s/article/43487/Application_Programming_Interface


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



<?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
$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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum