惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Heimdal Security Blog
SecWiki News
SecWiki News
H
Hacker News: Front Page
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
AI
AI
C
Cybersecurity and Infrastructure Security Agency CISA
Scott Helme
Scott Helme
PCI Perspectives
PCI Perspectives
S
Securelist
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyberwarzone
Cyberwarzone
A
Arctic Wolf
Forbes - Security
Forbes - Security
T
Tor Project blog
Spread Privacy
Spread Privacy
WordPress大学
WordPress大学
I
Intezer
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
博客园 - 司徒正美
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
P
Palo Alto Networks Blog
Google DeepMind News
Google DeepMind News
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
V
Vulnerabilities – Threatpost
Jina AI
Jina AI
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
Simon Willison's Weblog
Simon Willison's Weblog
Project Zero
Project Zero
T
Threatpost
P
Privacy International News Feed
人人都是产品经理
人人都是产品经理
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - 锐

Windows7 Server 2008 下安装Oracle 10g提示“程序异常终止,发生未知错误”的解决方法 Android应用自动更新功能的代码实现 Undefined exploded archive location 项目不能部署 linux下mysql5.5.19编译安装笔记【已验证】 CSS+DIV排版时容器内对象全部设置了float属性后容器不能自动适应高度的解决方案 php Smarty模板生成html文档的方法 - 锐 - 博客园 如何解决Firefox检测不到div高度问题 DD_belatedPNG,解决IE6不支持PNG绝佳方案 .net程序运行在无.net framework环境中 struts2 freemarker当中引进java 常量java静态方法 - 锐 简体-繁体互转换的一个JS - 锐 - 博客园 C#实现通过URL触发自己的程序 国内三大免费流媒体WAP门户网站(视频类WAP网站) C#中RSA加密解密和签名与验证的实现 (转) C#读取CPUid,硬盘id,网卡Mac地址 Struts2.1.6使用小技巧 java -D参数简化加入多个jar MySQL Proxy 学习笔记(转) 用apache ab做web压力测试
Tencent://Message/协议的实现原理 - 锐 - 博客园
· 2010-07-15 · via 博客园 - 锐

腾讯官方通过 Tencent://Message/协议可以让QQ用户显示QQ/TM的在线状态发布在互联网上;并且点击 ,不用加好友也可以聊天:

官方链接: http://is.qq.com/webpresence/code.shtml

具体代码:

<a href="

tencent://message/?uin=215555521&Site=JooIT.com&Menu=yes">
<img border="0" SRC='http://wpa.qq.com/pa?p=1:215555521:3' alt="点击这里给我发消息">
</a>

但它是如何实现的呢?下面文章以及微软官方说明详细解释了其工作原理:


微软官方说明:http://msdn.microsoft.com/zh-cn/library/aa767914(en-us,VS.85).aspx

Register protocol,此文中对于 Windows、Linux 和 OS X 操作系统如何注册协议都有说明。比如说 Windows,其实只需写入注册表,即可实现协议与执行程序的关联。例如腾讯的Tencent://Message协议注册表如下:

[HKEY_CLASSES_ROOT\TENCENT]
@=”TencentProtocol”
“URL Protocol”=”D:\\Program Files\\Tencent\\QQ\\Timwp.exe”

[HKEY_CLASSES_ROOT\TENCENT\DefaultIcon]
@=”D:\\Program Files\\Tencent\\QQ\\Timwp.exe,1″

[HKEY_CLASSES_ROOT\TENCENT\shell]

[HKEY_CLASSES_ROOT\TENCENT\shell\open]

[HKEY_CLASSES_ROOT\TENCENT\shell\open\command]
@=”\”D:\\Program Files\\Tencent\\QQ\\Timwp.exe\” \”%1\”"

此注册表所实现的就是当浏览器(或其它)碰到 tencent://… 时,自动调用 Timwp.exe,并把 tencent://… 地址作为第一个参数传递给 Timwp.exe,并通过Timwp.exe判断传入的参数格式,若正确则检查系统中是否存在TIMPlatform.exe进程,不存在则提示"系统检测到您的机器上没有启动QQ",若存在则判断是否有已经登陆的QQ,没有登陆的话则提示“请先登陆”,若有已登陆QQ则弹出对应QQ号码的聊天窗口.

阿里旺旺也应用了该方法,注册表表内容如下:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\aliim]
@=""
"URL Protocol"=""

[HKEY_CLASSES_ROOT\aliim\Shell]

[HKEY_CLASSES_ROOT\aliim\Shell\Open]

[HKEY_CLASSES_ROOT\aliim\Shell\Open\Command]
@="D:\\Program Files\\AliWangWang\\wwcmd.exe %1"

aliim:sendmsg?uid=cntaobao发送者帐号&touid=cntaobao接收者帐号