0

我想使用用户名和密码通过 cURL 登录管理面板来执行一些操作。
不像这里

4

1 回答 1

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);
}
于 2012-10-17T13:20:19.043 回答