How to know from which email client the HTTP request was coming from? [duplicate]

為{幸葍}努か 提交于 2019-12-08 04:21:52

问题


Possible Duplicate:
Email client detection

I have a newsletter which will have a link to my websites pages. Now i want to know which email client (gmail, hotmail, outlook) the user opened the newsletter in and clicked the link to the website page.

The reason I want to know which email client, is because i want to customize the content in website pages based on the use of email client by users.

My Website pages will be coded in PHP


回答1:


Look at the User-Agent header ($_SERVER['HTTP_USER_AGENT']).

For users using webmails, the user-agent will be that of their browser; so you could look at the Referer header ($_SERVER['HTTP_REFERER']) too. (But notice that browsers don't send referer headers from https sites.)



来源:https://stackoverflow.com/questions/7422754/how-to-know-from-which-email-client-the-http-request-was-coming-from

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!