#!/usr/bin/php /dev/null &"); } if (strtolower($target) == 'appletv') { // XBMC Notification exec("curl -s --connect-timeout 5 \"http://$target:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn¶meter=XBMC.Notification%28" . urlencode($title) . "%2C" . urlencode($text_xbmc) . "%2C15000)\" > /dev/null &"); } else if (strtolower($target) == 'boxcar') { $boxcar_username = 'me@gmail.com'; $boxcar_password = 'boxcar_password'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, $boxcar_username . ':' . $boxcar_password); curl_setopt($ch, CURLOPT_URL, 'https://boxcar.io/notifications'); curl_setopt($ch, CURLOPT_POST, 3); curl_setopt($ch, CURLOPT_POSTFIELDS, 'notification[from_screen_name]=' . urlencode($title) . '¬ification[message]=' . urlencode($text)); $result = curl_exec($ch); curl_close($ch); } else { // Growl Notification if (strtolower($target) == 'imac') { $target = 'wife@imac'; } else if (strpos(strtolower($target), 'mini2') === 0) { $target = 'someone@mini2'; } else if (strtolower($target) == 'powermacg5') { $target = 'me@powermacg5'; } else if (strtolower($target) == 'macbook') { $target = 'me@macbook'; } exec("ssh -o 'ConnectTimeout 5' $target 'echo \"$text\" | bin/growlnotify -t \"$title\" --$image_type \"$image\"' &"); } } ?>