Easy way to add the status of skype into the site, see link: www.skype.com/share/buttons/. On this page, enter your account name and select a style icon, which you prefer. At bottom of page you can find a window with HTML code that can be used on the site.
SkypeWeb responds in one of the following formats, depending on the request URI:
XML output URI: http://mystatus.skype.com/skypename.xml
NUM output URI: http://mystatus.skype.com/skypename.num
TXT output URI: http://mystatus.skype.com/skypename.txt
Image output URI: http://mystatus.skype.com/skypename
There is another one responds format - DNS Query,
which described at SkypeWeb Developer Notes
SkypeWeb uses a combination of methods to manage localisation.
To declare a language, add the language suffix to an HTTP request, for example:
http://mystatus.skype.com/test_user.txt.fr
http://mystatus.skype.com/test_user.png.sw
If you do not declare a language in the HTTP request you send to the SkypeWeb server:
SkypeWeb attempts to match the language set by the browser in the header information of the HTTP request.
If SkypeWeb does not support this language, the server returns the default language, which is English.
available language list:
en, de, fr, It, pl, ja, pt, pt-br, se, zh, cn, zh-cn, hk, tw, zh-tw
How you can use custom status images.
We have to prepare 6 image files for status, example:
1.png - Offline,
2.png - Online,
3.png - Away,
4.png - Not Available ,
5.png - Do Not Distrub,
7.png - Skype Me
To obtain status you can use CURL library, PHP example implementation:
<?php
function get_skype_status_num_by_user_name($user_name)
{
$url = 'http://mystatus.skype.com/'.$user_name.'.num';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$r = curl_exec($ch);
curl_close($ch);
return (int)$r;
}
?>
Usage example:
<?php
$user_name = 'testuser';
$status = get_skype_status_num_by_user_name($user_name);
?>
<a href="skype:<?php echo $user_name;?>?call">
<img src="path/to/skype/buttons/<?php echo $status;?>.png" style="border: none;" width="182" height="44" alt="My status" />
</a>
2010.02.04
Author: Lirik