腾讯qq在线代码(腾讯在线QQ代码和实现原理「建议收藏」)

发布时间:2025-12-10 19:32:13 浏览次数:7

腾讯在线QQ代码和实现原理「建议收藏」-腾讯qq在线代码怎么用

腾讯在线QQ代码和实现原理「建议收藏」腾讯官方通过Tencent://Message/协议可以让QQ用户显示QQ/TM的在线状态发布在互联网上;并且点击,不用加好友也可以聊天。官方链接:http://wp.qq.com/consult.html具体代码:<ahref=”http://wpa.qq.com/msgrd?v=3&uin=734956613&site=qq&menu=yes”target=”_blank”><imgborder=”0″src=”http://wpa.qq.

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

官方链接: http://wp.qq.com/consult.html

具体代码:

<a href="http://wpa.qq.com/msgrd?v=3&uin=734956613&site=qq&menu=yes" target="_blank"><img border="0" src="http://wpa.qq.com/pa?p=2:734956613:51" alt="欢迎加我QQ734956613交流" title="欢迎加我QQ734956613交流"/></a>

是否还在为Ide开发工具频繁失效而烦恼,来吧关注以下公众号获取最新激活方式。亲测可用!

为防止网络爬虫,请关注公众号回复”口令”

激活idea 激活CLion DataGrip DataSpell dotCover dotMemory dotTrace GoLand PhpStorm PyCharm ReSharper ReShaC++ Rider RubyMine WebStorm 全家桶 刷新

【正版授权,激活自己账号】:Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】:官方授权 正版激活 自己使用,支持Jetbrains家族下所有IDE…

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

微软官方说明:

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。

程序代码:

A protocol is a method that is used to send, receive, and handle information over a connection. Common protocols viewed from the browser include http, ftp, and mailto. In order for you to view information sent over a specific protocol, it must be registered. Once registered, the protocol can then be handled by the program you specify, such as your browser or a 3rd party viewer. This means that a hyperlink ( e.g. foo://fred ) can use the handler for protocol foo to open the file named fred.Contents [hide]1 Registering an unsupported protocol1.1 Windows1.2 Linux1.3 OS X2 Redirecting a registered protocol[edit]Registering an unsupported protocolMozilla products utilize protocols defined internally, as well as those defined by the operating system. You can add the ability to use an unsupported protocol by registering it. The OS-specific method of doing this is described below.[edit]WindowsCreate the registry .reg file, replacing foo with your unregistered protocol, and the path with whatever handler program you want to run. Then merge it into the Windows registry.REGEDIT4[HKEY_CLASSES_ROOT\foo]@=”URL:foo Protocol”“URL Protocol”=””[HKEY_CLASSES_ROOT\foo\shell][HKEY_CLASSES_ROOT\foo\shell\open][HKEY_CLASSES_ROOT\foo\shell\open\command]@=”\”C:\\Program Files\\Application\\program.exe\” \”%1\””See Registering an Application to a URL Protocol for additional information.[edit]LinuxRegistration is unnecessary. Simply associate whatever proto: with a program through Firefox: Example: Add the sip: protocol to launch kphone for VoIP calls in Firefox:– Type about:config into the address bar– Right-click create new boolean value: network.protocol-handler.external.sip and set to true– Right-click create new boolean value: network.protocol-handler.warn-external.sip and set to false– Right-click create new string value: network.protocol-handler.app.sip and set to /usr/bin/kphoneThis will actually launch kphone. Not sure if it will dial though. That is untestedYou can also optionally register the protocol with whatever window manager you are using. In KDE this is done through Control Center – KDE Components – File Associations. This step is usually unnecessary unless your window manager has a custom browser, such as konqueror.[edit]OS XProbably very similar to Linux (above).[edit]Redirecting a registered protocolIf the protocol is already handled by the browser, you can specify what program will be used as a handler to open the file. To do this, add the pref:network.protocol-handler.app.foo as a string with value C:\Program Files\Application\program.exeNote: If the path or name is incorrect, the browser will display an error saying “protocol (foo) isn’t associated with any program”. (See bug 312953).You may also need to use the following prefs, although this is uncertain:network.protocol-handler.external.foo = truenetwork.protocol-handler.expose.foo = false
需要做网站?需要网络推广?欢迎咨询客户经理 13272073477