Magento管理员用cURL登录

问题描述:

我想用用户名和密码用cURL登录管理面板来执行一些操作。
不像hereMagento管理员用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); 
}