I am accessing database using simple http request and use it on another interface.for example api's for Andriod or iphone .Even simple http request and method created in mage functionality without using any api its running perfectly.
Then Why there is any need of api's , rest or soap ? Below code is used to load magento site cart through android app .No api is used in this.
<?php
require_once 'app/Mage.php';
Mage::setIsDeveloperMode(true);
$websiteId = Mage::app()->getWebsite()->getId();
$storeId = Mage::app()->getStore()->getStoreId();
$currencySymbol = '£';
$method = isset($_REQUEST['method']) ? $_REQUEST['method'] : "";
switch ($method) {
case 'LoadCart': http://mysiteurl/T4T-mage-api.php?method=LoadCart&cart_id=2//loading time= 506 msif($_REQUEST['cart_id'])
{
$session = Mage::getSingleton("core/session", array("name" => "frontend"));
$quote = Mage::getModel('sales/quote')->load($_REQUEST['cart_id']);
$quote->setIsActive(true);
$quote->save();
Mage::getSingleton('checkout/session')->replaceQuote($quote);
header('location:/checkout/cart/');
}
break;
default :echo 'This is Not a Valid Method.';
}?>