Custom Skype online/offline status
Results 1 to 10 of 10

Thread: Custom Skype online/offline status

  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    466

    Custom Skype online/offline status

    I just wanted to post this because I searched forever & couldn't find anything. Maybe it will help someone else out or someone has something better.. Might not be the best solution, I have yet to see anything else, but it works.. With this you're able to use your own custom buttons, text, run something, etc. by determining the size of Skypes online/offline user buttons

    PHP Code:
    $button "http://mystatus.skype.com/smallicon/username.png";
    $status "status.png";
    copy($button$status);
    //online = 428  offline = 376
    if (filesize($status) > 400) {
        
    //online
    } else {
        
    //offline

    Last edited by coldwerturkey; 12-01-2008 at 09:59 AM.

  2. #2
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,432
    What about...

    PHP Code:
    function getSkypeStatus($username) {
        
    $data file_get_contents('http://mystatus.skype.com/' urlencode($username) . '.xml');
        
        return 
    strpos($data'<presence xml:lang="en">Offline</presence>') ? 'Offline' 'Online';
        
    // Or replace the two strings with integer 1 or 0 (or boolean TRUE or FALSE)
        // ... whatever you want

    or, slightly more versatile, ...
    PHP Code:
    function getSkypeStatus($username) {
        
    $data file_get_contents('http://mystatus.skype.com/' urlencode($username) . '.xml');
        
    preg_match('@<presence xml:lang="en">(.*?)</presence>@i'$data$match);

        return isset(
    $match[1]) ? $match[1] : 'Error retrieving status';


  3. #3

  4. #4
    Senior Member
    Join Date
    Oct 2007
    Posts
    466
    Quote Originally Posted by bradgrafelman View Post
    What about...

    PHP Code:
    function getSkypeStatus($username) {
        
    $data file_get_contents('http://mystatus.skype.com/' urlencode($username) . '.xml');
        
        return 
    strpos($data'<presence xml:lang="en">Offline</presence>') ? 'Offline' 'Online';
        
    // Or replace the two strings with integer 1 or 0 (or boolean TRUE or FALSE)
        // ... whatever you want

    or, slightly more versatile, ...
    PHP Code:
    function getSkypeStatus($username) {
        
    $data file_get_contents('http://mystatus.skype.com/' urlencode($username) . '.xml');
        
    preg_match('@<presence xml:lang="en">(.*?)</presence>@i'$data$match);

        return isset(
    $match[1]) ? $match[1] : 'Error retrieving status';

    sooo much better than that waste of time I was doing. thank you sir.

    Although for reference i think its better to search for an "online" and else the "offline" instead of how you have it as, if the status is Idle, Away, etc. the returned status would be "online" - which is usually what you're not when you are Idle, Away, etc.

  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    3
    I was looking at my website again and thought I need to have only the skype online image visible.

    I could not get the above code to work or the code in the other link I posted; so I made something that echoed the http://mystatus.skype.com/user.name.here.txt in the image name to display the image url I wanted from my server. :-)

    Code, image files, and instructions are here: http://www.abcpchelp.com/phpSkypeBut...tomButtons.zip

  6. #6
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Quote Originally Posted by mvandiermen View Post
    Code, image files, and instructions are here: http://www.abcpchelp.com/phpSkypeBut...tomButtons.zip
    you can also use the to create any image you want for each skype status, you just need to edit the images in the folder

  7. #7
    Junior Member
    Join Date
    Feb 2014
    Posts
    2
    Quote Originally Posted by mvandiermen View Post
    you can also use the to create any image you want for each skype status, you just need to edit the images in the folder
    Dear Sir,

    I've tried this but it is not working. It is giving me the following result where it is suppose to show the status image from skype_img directory.

    111.png

    It look like
    Code:
     {print $line;}?>
    couldn't the status/image name exactly. Can you help me sort out this?

  8. #8
    Senior Member
    Join Date
    Mar 2009
    Posts
    819
    Declare variables, not war.

  9. #9
    Junior Member
    Join Date
    Feb 2014
    Posts
    2
    Quote Originally Posted by Bonesnap View Post
    Will you help here?

  10. #10
    Junior Member
    Join Date
    Feb 2014
    Posts
    1
    Quote Originally Posted by sherazi21st View Post
    Will you help here?
    No, but I will. Well... Adrian Speyer will.
    Create Custom Skype Buttons
    The PHP code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •