Php Gmail自动登录脚本

Php Gmail自动登录脚本,php,cakephp,curl,cakephp-1.3,Php,Cakephp,Curl,Cakephp 1.3,我有gmail登录密码。 如果我们传递用户名和密码,是否可以自动登录到Gmail 通过url或CURL。如果右键单击gmail登录页面并查看源代码,您可以找到用户电子邮件的id和登录字段 然后,您可以使用这些来编写javascript以自动填充并提交 这里有一个实现,您可以检查 编辑:它不是使用你提到的语言,但它仍然是一个解决方案。此外,虽然链接url和文章标题没有提到gmail,但页面上有一个gmail版本的javascript您可以使用gmail IMAP界面访问所有邮件用代码示例详细说明流

我有gmail登录密码。 如果我们传递用户名和密码,是否可以自动登录到Gmail
通过url或CURL。

如果右键单击gmail登录页面并查看源代码,您可以找到用户电子邮件的id和登录字段

然后,您可以使用这些来编写javascript以自动填充并提交

这里有一个实现,您可以检查


编辑:它不是使用你提到的语言,但它仍然是一个解决方案。此外,虽然链接url和文章标题没有提到gmail,但页面上有一个gmail版本的javascript

您可以使用gmail IMAP界面访问所有邮件用代码示例详细说明流程。


<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<meta name="google-signin-client_id" content="783587177326-gtl5gpje4riio2ho6qnsfainp4a1mf5o.apps.googleusercontent.com">
</head>
<body>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
</body>
</html>
<script>
function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile();
  console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
</script>
函数onSignIn(谷歌用户){ var profile=googleUser.getBasicProfile(); console.log('ID:'+profile.getId());//不要发送到后端!改用ID令牌。 log('Name:'+profile.getName()); log('Image URL:'+profile.getImageUrl()); console.log('Email:'+profile.getEmail());//如果“Email”作用域不存在,则此值为null。 }
听起来很不安全,我怀疑Gmail是否会接受这样的用户名和密码。虽然我肯定有办法。为什么不使用IMAP接口呢?我不知道如何使用IMAP。。不知道。。你能举个IMAP的例子吗