Add “referer” to header when using ShellExecute

人走茶凉 提交于 2019-12-12 01:38:35

问题


I'm using ShellExecute to open the user's default browser to a specific web site.

I'd like to add a referer field to the URL.

Is this possible to do while continuing to use ShellExecute?

If not, any other suggestions to get a users default browser to open a URL with referer?


回答1:


The referrer is part of the HTTP protocol. ShellExecute opens an app which then processes the URL, by sending an HTTP request. It's that app that specifies the referrer.

The very best you could do would be to include something in the URL and process it at the HTTP server end (presumably you are in control of the server end).



来源:https://stackoverflow.com/questions/5067990/add-referer-to-header-when-using-shellexecute

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