Magento管理员用cURL登录
答
试试这个
$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);
}