// $this->Camera->startVideoStream(); // break; // case 'stopvideostream': // $this->Camera->stopVideoStream(); // break; // case 'startvideostream': // $this->Camera->startVideoStream(); // break; // case 'stopvideostream': // $this->Camera->stopVideoStream(); // break; default: $this->Response->setError('Invalid action: ' . $this->Request->data['action']); } $this->Response->send(); } public function hardcopy($filename) { $cmd = sprintf("lpr %s", $filename); exec($cmd, $out, $ret); if ($ret != 0) { $this->Response->setError($cmd . ' failed'); } else { $this->Response->setMessage($cmd . ' ok'); } } } //start_session(); $cheese = new Cheese(); $cheese->run();