【发布时间】:2020-01-23 03:59:40
【问题描述】:
如何手动在网站上发布 curl 登录并使用 google 重新捕获 它不起作用它说localhost不支持
这是代码
global $curl;
$link = "https://localhost.com/my-account/";
$s = $curl->get($link, 0);
$woocommerceloginnonce = get_string_between($s, 'woocommerce-login-nonce" value="', '"');
$post = array(
'_wp_http_referer' => 'https://localhost.com/my-account/',
'g-recaptcha-response' => $gRecaptchaResponsed,
'login' => 'Log in',
'password' => '!$%!@#',
'username' => 'something@example.com',
'woocommerce-login-nonce' => $woocommerceloginnonce
);
$headers = array(
"Upgrade-Insecure-Requests: 1",
"Content-Type: application/x-www-form-urlencoded",
"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36",
"Sec-Fetch-User: ?1",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
'referer: https://localhost.com/my-account/'
);
$curl->header($headers);
echo $s = $curl->post($link, json_decode($post), 0, 1, 0);
我有一个 curl 课来做 curl 的工作 那么我怎样才能通过它并转到我的帐户,我有谷歌 recapte 回应 或者我怎样才能用js代码做到这一点
【问题讨论】:
标签: javascript php curl