[英]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.