Включение музыки
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
//CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=pl_play',
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=in_play&input='.rawurlencode('/windows/ntfs/Музыка/Music'),
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
if ($response==NULL)
say("Плеер недоступен",2);
else
{
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=255',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
}
curl_close($myCurl);
say("Включаю музыку", 2);
|
Выключение музыки
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=pl_stop',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
if ($response==NULL)
say("Плеер недоступен",2);
else
{
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=255',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
}
curl_close($myCurl);
say("Выключаю музыку", 2);
|
Изменение громкости до 0%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=0',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 0 процентов", 2);
|
Изменение громкости до 10%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=26',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 10 процентов", 2);
|
Изменение громкости до 100%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=255',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 100 процентов", 2);
|
Изменение громкости до 20%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=51',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 20 процентов", 2);
|
Изменение громкости до 30%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=77',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 30 процентов", 2);
|
Изменение громкости до 40%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=102',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 40 процентов", 2);
|
Изменение громкости до 50%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=128',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 50 процентов", 2);
|
Изменение громкости до 60%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=153',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 60 процентов", 2);
|
Изменение громкости до 70%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=179',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 70 процентов", 2);
|
Изменение громкости до 80%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=204',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 80 процентов", 2);
|
Изменение громкости до 90%
|
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=230',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
curl_close($myCurl);
say("Громкость 90 процентов", 2);
|
Перемотка вперед
|
say ("Включаю следующий трэк",2);
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=pl_next',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
if ($response==NULL)
say("Плеер недоступен",2);
else
{
curl_setopt_array($myCurl, array(
//CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=255',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
}
curl_close($myCurl);
|
Перемотка назад
|
say ("Включаю предъидущий трэк",2);
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=pl_previous',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
if ($response==NULL)
say("Плеер недоступен",2);
else
{
curl_setopt_array($myCurl, array(
//CURLOPT_URL => 'http://192.168.0.2:8080/requests/status.xml?command=volume&val=255',
CURLOPT_CONNECTTIMEOUT => 1,
CURLOPT_USERPWD => ":3ch7fg4x"
));
$response = curl_exec($myCurl);
}
curl_close($myCurl);
|