我尝试了curl登录,但结果总是转到 405不允许。如何解决?
我认为这是SSL问题,因此我将HTTPS安装到我的本地主机,但它不会改变结果,仍然是405 Not Allowed:'(
$ch = curl_init();
$data=array(
'email'=>'user@admin.com',
'password'=>'password',
);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_URL, "https://2secure.jenius.co.id/#/authentication/login");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie-name.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie-name.txt');
$hasil=curl_exec($ch);
curl_close ($ch);
echo $hasil;