Hallo hab hier mal eine frage an euch ich hab folgen script gefunden der mir erleubt über das netzwerk befehle an meine bose anlage zu senden!
nur weiß ich nicht wie ich das ganze mit dem Gira Homserver funktionsfähig zum laufen bekomme
Über Hilfe wäre ich Dankbar
Hier der code
<? // Bose Soundtouch Preset schalten // IP-Adresse für Bose Soundtouch anpassen $ip = "192.168.1.2"; // Account $sourceAccount = ""; // Quelle $source = "INTERNET_RADIO"; // Name des Senders $itemName = "ETN.FM 1 - Trance Channel"; // Senderposition $location = "15275"; // Preset $isPresetable = "true"; // XML Data $xml_data = '<ContentItem source="'.$source.'" sourceAccount="'.$sourceAccount.'" location="'.$location.'"> <itemName>'.$itemName.'</itemName> </ContentItem>'; echo $xml_data; // cURL $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => 'http://'.$ip.':8090/select', CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => 1, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $xml_data, CURLOPT_HTTPHEADER => array('Content-type: text/xml') )); $resp = curl_exec($curl); curl_close($curl); ?>
nur weiß ich nicht wie ich das ganze mit dem Gira Homserver funktionsfähig zum laufen bekomme
Über Hilfe wäre ich Dankbar
Hier der code
<? // Bose Soundtouch Preset schalten // IP-Adresse für Bose Soundtouch anpassen $ip = "192.168.1.2"; // Account $sourceAccount = ""; // Quelle $source = "INTERNET_RADIO"; // Name des Senders $itemName = "ETN.FM 1 - Trance Channel"; // Senderposition $location = "15275"; // Preset $isPresetable = "true"; // XML Data $xml_data = '<ContentItem source="'.$source.'" sourceAccount="'.$sourceAccount.'" location="'.$location.'"> <itemName>'.$itemName.'</itemName> </ContentItem>'; echo $xml_data; // cURL $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => 'http://'.$ip.':8090/select', CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => 1, CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $xml_data, CURLOPT_HTTPHEADER => array('Content-type: text/xml') )); $resp = curl_exec($curl); curl_close($curl); ?>
Kommentar