I finally got that basic example screen working after opening a VSS API support ticket.
The problem I had was I didnt realize that the ticket sent back from my PHP API call to VCD was returning a URL encoded string. After decoding it it worked:
list($vmidtemp, $ticketencoded) = split("=", $_GET['ticketdata']);
$ticket = urldecode($ticketencoded);
preg_match("/vm-\d+/", $vmidtemp, $matches);
$vmid = $matches[0];
then
<script language="Javascript">
function page_loaded() {
ict_init();
if ( ict_isReadyToStart() == true ) {
ict_startup();
ict_connect('hostname.exmaple.ca','<?php echo $vmid; ?>','<?php echo $ticket; ?>');
}
}
</script>
Note we just copied the connect routine and modified it to be simpler.