View Single Post
Old 11-19-2012, 05:54 PM   PM User | #3
nani_nisha06
Regular Coder

 
Join Date: Oct 2012
Location: mother land --india
Posts: 159
Thanks: 37
Thanked 2 Times in 2 Posts
nani_nisha06 is an unknown quantity at this point
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
nani_nisha06 is offline   Reply With Quote