简体   繁体   English

用户单击链接时获取用户的电子邮件ID

[英]get user's email id when user clicks on link

I'm sending a link on gmail account. 我正在Gmail帐户上发送链接。

analytics.com/get_email_address.php

On this php page,I'm trying to use $_SERVER['HTTP_REFERER'] to get previous URL.But it's giving nothing.Please help me out to get previous URL when user click on the above link (from his gmail inbox). 在此php页面上,我尝试使用$_SERVER['HTTP_REFERER']获取以前的URL。但是它没有任何帮助。当用户单击以上链接(从他的gmail收件箱中)时,请帮助我获取以前的URL。

Actually I'm trying to fetch user's email id.If there is any other idea to get user's email id and domain name,please tell me. 实际上,我正在尝试获取用户的电子邮件ID。如果还有其他获取用户的电子邮件ID和域名的想法,请告诉我。 Thank You. 谢谢。

GMail is served over HTTPS. GMail通过HTTPS提供。 To protect the potentially sensitive data that can be in URLs on HTTPS sites, browsers do not send referers when leaving an HTTPS site. 为了保护HTTPS站点上URL中可能存在的敏感数据,浏览器在离开HTTPS站点时不会发送引用。

The URL used to access a GMail account does not include any personally identifying information about the user. 用于访问GMail帐户的URL不包含有关该用户的任何个人身份信息。

That makes it impossible, twice over, to get the information you want from the referer. 这样一来,就不可能两次从引荐来源获得您想要的信息。

Since you know the email address you are sending mail to, you can include it in a query string in the link. 由于您知道要将邮件发送到的电子邮件地址,因此可以将其包含在链接的查询字符串中。 Be warned, however, that this can increase your "Probably Spam" score in a lot of filters and if the email is forwarded, the address will not be updated in the forwarded mail. 请注意,但是,这可以在许多过滤器中提高您的“可能是垃圾邮件”评分,并且如果转发了电子邮件,则转发的邮件中的地址将不会更新。

You are sending a Link, So you can pass a unique ID (Which you have to create earlier on user Registration) with that Link and Retrive it when you going to fetch the user Data. 您正在发送链接,因此您可以传递带有该链接的唯一ID(必须在用户注册之前创建该ID),并在获取用户数据时检索它。

By that unique ID you can easily get Users EmailID from your database. 通过该唯一ID,您可以轻松地从数据库中获取“用户EmailID”。

You are already sending a link on email id. 您已经在电子邮件ID上发送了链接。 ie you already have users email id with you. 即您已经有了用户的电子邮件ID。
Simply modify your link to include some digest of users email id in query string part and then in your php script access the query string with $_GET, and then get actual mapped email from the digest. 只需修改您的链接,以在查询字符串部分包含一些用户电子邮件ID的摘要,然后在您的php脚本中使用$ _GET访问查询字符串,然后从摘要中获取实际的映射电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用户单击链接时设置标题 - Setting header when user clicks on a link 当用户单击链接时插入到MySQL数据库中 - Insert into MySQL database when user clicks on a Link 当用户点击链接继续访问网站时,使用php-ga和维护会话的Google Analytics电子邮件视图 - Google Analytics email views with php-ga & maintaining session when user clicks link to continue to site 在 Stripe 中,当用户点击电子邮件中收到的链接时,是否有任何方法可以进行独立付款? - In Stripe is there any method to make a standalone payment when user clicks on a link which is received in email? 我希望用户多次单击电子邮件激活链接时显示正确的消息 - I want correct message to be displayed when user clicks on email activation link multiple times 当用户点击我的 Facebook 广告时如何获取一些唯一的用户 ID - How to get some unique user id when user clicks my Facebook Ad 当用户单击引用ID数据库的链接时,如何运行PHP代码? - How do I run PHP code when a user clicks on a link in reference to id database? Wordpress通过电子邮件获取用户ID - Wordpress get user id by email 使用 Facebook 登录按钮获取用户的 Facebook 电子邮件 ID - Get user's Facebook email id with facebook login button 登录用户的电子邮件ID yahoo oauth php - Get Logged in user's email id yahoo oauth php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM