1

我想制作代替执行这种链接的php脚本:

<a href="ymsgr:sendim?tonystark">YM! Iron Man</a>

因此,当调用/执行 php 脚本时,它将打开准备向 tonystark 发送 IM 的 Yahoo Messenger 应用程序窗口。

我可以改用标题吗?但它会是什么类型的标题?

4

2 回答 2

2

ymsgr是配置为启动 Yahoo Messenger 的自定义协议,它能够解析“”之后的适当参数:

这个问题如何创建我自己的 URL 协议?)可能是相关的,因为它显示了如何添加自定义 URL 协议。该示例仅适用于 Windows,但它必须是其他操作系统的类似方法。

简而言之,ymsgr:打开 Yahoo Messenger,因为您的系统可以识别它并且 Yahoo Messenger 是它的关联操作。

于 2013-05-16T11:32:10.943 回答
0

The ymsgr in the link is a predefined protocol on your PC. Just like http, https and ftp are protocols known to your system. If you want to create custom protocols to be handled by the pc of your visitor, you must have them install something that will add the protocol to the system. Only then will the pc know what to start.

A good example of a non-standard installed protocol is skype. The links to add a user to your skype or chat with them only works if the visiting person has Skype installed. Otherwise an error occurs on the computer; "I don't know this protocol, what to do?"

So using a header to replicate the link will not work. Simply because your PC will not understand a header; it will only understand links to protocols, as if you are opening a page (http,https), email application (mailto), ftp programme (filezilla, unless handled by browser) etc etc.

于 2013-05-16T11:24:31.170 回答