查询lynx -dump https://www.google.com/accounts/o8/id
会导致<URI>https://www.google.com/accounts/o8/ud</URI>
我在params
$base_url = "https://www.google.com/accounts/o8/ud";
$params = array();
$params['openid.mode'] = 'checkid_setup';
$params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
$params['openid.return_to'] = 'http://DOMAIN.net/callback.php';
$params['openid.ax.required'] = 'email';
$params['openid.ax.mode'] = 'fetch_request';
$params['openid.ns.oauth'] = 'http://specs.openid.net/extensions/oauth/1.0';
$params['openid.oauth.consumer'] = 'http://DOMAIN.net';
$params['openid.oauth.scope'] = 'https://www.googleapis.com/oauth2/v2/userinfo';
$params['openid.claimed_id'] = 'http://specs.openid.net/auth/2.0/identifier_select';
$params['openid.identity'] = 'http://specs.openid.net/auth/2.0/identifier_select';
$params['openid.realm'] = 'http://DOMAIN.net/callback.php';
我将params
放入CURLOPT_POSTFIELDS
并向$base_url
发送POST请求,该请求返回HTTP响应
HTTP/1.1 302 Moved Temporarily
Location: https://accounts.google.com/o/openid2/auth?zt=ChR6dFJDNkpUT2UzbjFEVXNFOERTORIfY3B6Qmg2M1U5TDBlc2hRVjBpZVpEQW91T3JxWF3SQ%E2%88%99APsBz4gAAAAAT0znr5g_miMEG2KIgbjvJ32KInJjo-Sg&hl=en-US
但是,当我按照Location
页眉时,我来到一个页面上说<
>您请求的页面无效。