Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-17-2012, 05:29 PM   PM User | #1
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
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..
nani_nisha06 is offline   Reply With Quote
Old 11-18-2012, 08:43 AM   PM User | #2
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
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>
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Users who have thanked Redcoder for this post:
nani_nisha06 (11-19-2012)
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
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:00 PM.


Advertisement
Log in to turn off these ads.