function plugin_skype_convert()
{
    static $call = FALSE;
    $argv = func_get_args();
    $argc = func_num_args();
    $field = array('user', 'func', 'size');
    for ($i = 0; $i < $argc; $i++) {
        ${$field}[$i] = htmlspecialchars($argv[$i], ENT_QUOTES);
    }
    if (empty($user)) {
        return '';
    }
    $func = skype::is_function($func) ? $func : 'userinfo';
    $size_info = skype::size_info($size);
    $link = 'skype:' . $user . '?' . $func;
    $img = '<img src="' . SKYPE_MYSTATUS_URL . $size_info[0] . '/' . $user . '" style="border: none;" width="' . $size_info[1] . '" height="' . $size_info[2] . '" alt="My status" />';
    $rc = '';
    if (!$call) {
        $call = TRUE;
        $rc = <<<EOD
<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>

EOD;
    }
    $rc .= '<a href="skype:' . $user . '?' . $func . '">' . $img . "</a>\n";
    return $rc;
}
Exemple #2
0
<?php

/*
   _____ _                     _____  _    _ _____  
  / ____| |                   |  __ \| |  | |  __ \ 
 | (___ | | ___   _ _ __   ___| |__) | |__| | |__) |
  \___ \| |/ / | | | '_ \ / _ \  ___/|  __  |  ___/ 
  ____) |   <| |_| | |_) |  __/ |    | |  | | |     
 |_____/|_|\_\\__, | .__/ \___|_|    |_|  |_|_|     
               __/ | |                              
              |___/|_|      
			  
Version: 1.1 by Kibioctet (admin@n-mail.fr)
GitHub : https://github.com/Kibioctet/SkypePHP
*/
header("Content-Type: text/plain");
set_time_limit(300);
require "skype.class.php";
$username = "******";
$password = "******";
$skype = new skype($username, $password);
$skype->sendMessage("echo123", "Hello world from PHP at " . date("H:i:s") . " !");
echo "Messages with you and echo123:\n\n";
print_r($skype->getMessagesList("echo123"));
echo "\n\nYour profile : \n\n";
print_r($skype->readMyProfile());
echo "\n\nProfile of echo123 : \n\n";
print_r($skype->readProfile(array("echo123")));
echo "\n\nYour contacts list :\n\n";
print_r($skype->getContactsList());