Hi all,

I have recently written a live support module for Zen Cart, using Skype.
This was an easy mod, as Skype returns all what is needed to publish the status online.

However, as the images used are from another server, it gives a warning on https. So now I am rewriting this mod.

The concept is easy:
  1. Call a file from Skype with status info
  2. Read the file contents
  3. Use the results to display status (online/offline)


But as a newbie (wannabe maybe....LOL) programmer I have not been able to read the contents of the file, and turn it into a if/else statement. Now it does just display "offline" all the time, even if you are "online"

Code:
<?php
  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">' . "\n" ;
  $filename = "http://mystatus.skype.com/, SkypeUserName.num";
  $status = file_get_contents($filename);
//  $result = include($filename);
    if ($result=='2')
	$content .= '<a href="skype:SkypeUserName?call"><img src="./images/skype/online.gif" style="border: none;" width="140" height="56" alt="Available" /></a>';
	else	
	$content .= '<img src="./images/skype/not_online.gif" style="border: none;" width="140" height="56" alt="Not Available" />';
  $content .= '</div>';
?>
The SkypeUserName.num file contains just one line, with digits (0, 1, 2, 3, 4, 5, 6). Digit "2" means that the user is online, so that is why ($result=='2') is used.

The same file could be called as SkypeUserName.text which returns one line with one word, or as SkypeUserName.xml.

Can anyone tell me how to get "$result =" to read the contents?.

The results of the above code can be seen here

Once I have this portion of the code working, I will attempt to create a menu in manager to fill in "SkypeUserName" so no one needs to edit any code during install.

Many thanks,

Goshawk