Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/269.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何通过php打开Web链接_Php_Raspberry Pi_Raspberry Pi2_Raspberry Pi3 - Fatal编程技术网

如何通过php打开Web链接

如何通过php打开Web链接,php,raspberry-pi,raspberry-pi2,raspberry-pi3,Php,Raspberry Pi,Raspberry Pi2,Raspberry Pi3,我一直试图让我的Raspberry Pi 3服务器通过Epiphany或Chromium通过PHP打开一个网站 此Pi用作闹钟,当闹钟响起时,它将在网络流上播放音乐 我知道脚本是必要的,因为只需编写exec('epiphany www.examplewebsite.com')不会做任何事情 所以我的问题是,解决这个问题最聪明、最简单的方法是什么? ?php $hour=$_GET[“hour”]; $mins=$_GET[“mins”]; //这基本上控制GPIO引脚,但我想它打开一个网站或做

我一直试图让我的Raspberry Pi 3服务器通过
Epiphany
Chromium
通过
PHP
打开一个网站

此Pi用作闹钟,当闹钟响起时,它将在
网络流上播放音乐

我知道脚本是必要的,因为只需编写
exec('epiphany www.examplewebsite.com')不会做任何事情

所以我的问题是,解决这个问题最聪明、最简单的方法是什么?

?php
$hour=$_GET[“hour”];
$mins=$_GET[“mins”];
//这基本上控制GPIO引脚,但我想它打开一个网站或做其他事情

//exec('echo'.$mins'.$hour'.***sudo gpio-g write 18 1;sudo/home/pi/raspberry remote//send 11010 1“| crontab-”);?>
file\u获取内容
curl
将获取网站内容。这取决于那个网页,但这可能有效,也可能无效。这对我不起作用。我所需要做的就是通过php启动一个应用程序。所以问题不在于如何通过php打开一个Web链接。根据需要编辑问题。