2012-07-17 176 views

回答

2

试试这个

$APIURL = "http://APIURL:port/API/login/"; 
$method = "POST"; 
$http = new Varien_Http_Client(APIURL."?username=".$login['username']."&password=".$login['password']); 
$response = $http->request($method); 
$body = $response->getBody(); 

try { 
    $verifyUser = json_decode($body); 
} 
catch (Exception $e) { 
    throw Mage::exception('Mage_Core', $e); 
}