API - Application Programming Interface

From ChrisDevbox

Jump to: navigation, search

An interface for letting a program communicate with another program. In web terms: An interface for letting web browsers or web servers ...


[edit] Code Example (PHP)

 <?php
 $invoke = $_GET['invoke'];
 if($invoke=='GetContactInfoByName')
 {
   GetContactInfoByName($_GET['name']);
 }
 function GetContactInfoByName($name)
 {
   //Go into db and retrieve the info
   //Return XML or JSON (Or any other type of response)
 }

XML Response Example

 <Contact>
   <Name>Chris</Name>
   <Country>US</Country>
 </Contact>

[edit] Helpful Links

Personal tools