Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Send PEI Energy Interchange report to a Nabaztag rabbit
$apiKey = "get this from";
$localDir = "/www/htdocs-ruk/nabaztag/wav";
$webDir = "";
$id = uniqid();
$nbso = simplexml_load_file("");
$message = "P E I energy interchange is " . $nbso->PEI . " megawatts";
system("/usr/local/bin/swift \"" . escapeshellarg($message) . "\" -o $localDir/$id.wav");
$fp = fopen("$apiKey/play?url=" . urlencode("$webDir/$id.wav"),"r");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.