Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.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_Api_Laravel - Fatal编程技术网

Php 如何检查来自移动应用程序或WEB的请求

Php 如何检查来自移动应用程序或WEB的请求,php,api,laravel,Php,Api,Laravel,我需要检查请求是否来自使用LAREVEL的Android、IOS或WEB移动应用程序 我正在使用 $value=\Request::header'Content-Type'; 它回来了 应用程序/x-www-form-urlencoded 那么我如何检测请求来源呢?看看这个 使用很简单,请阅读文档 $agent->is('Windows'); $agent->is('Firefox'); $agent->is('iPhone'); $agent->is('OS X');

我需要检查请求是否来自使用LAREVEL的Android、IOS或WEB移动应用程序

我正在使用 $value=\Request::header'Content-Type'; 它回来了

应用程序/x-www-form-urlencoded

那么我如何检测请求来源呢?

看看这个

使用很简单,请阅读文档

$agent->is('Windows');
$agent->is('Firefox');
$agent->is('iPhone');
$agent->is('OS X');

你到底为什么需要这种检测?