Search code examples
phphyperlinkheaderhref

How does link with href parameter like "ymsgr:sendim?username" works, what kind of header does it send


I want to make php script that replace the execution of this kind of a link:

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

So when the php script is called/executed, it will open Yahoo Messenger application window that prepared to send IM to tonystark.

Can I use header instead? but what type of header it would be?


Solution

  • The ymsgr is a custom protocol that is configured to start Yahoo Messenger, which is able to parse appropriate parameters following the ":".

    This question (how do I create my own URL protocol?) may be relevant as it shows how it is possible to add custom URL protocols. The example is for Windows only but it must be a similar approach for other operating systems.

    To make a story short, ymsgr: opens Yahoo Messenger because your system can recognize it and that Yahoo Messenger is its associated action.