我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

我如何从移动应用程序或WEB检查请求

i need to check if the request came from a mobile App (Android or IOS) or WEB using LAREVEL.

I am using $value = \Request::header('Content-Type'); and it returns

application/x-www-form-urlencoded

So how i detect request origin?

Have a look on this https://github.com/jenssegers/agent

Using is simple , read the documentation.

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

近期文章

  • Ajax / PHP .post和.load不返回任何数据
  • 使用zf2自动完成Json响应格式
  • 从CodeIgniter 3中的url中删除index.php
  • 在cakephp中将数据从javascript传递给PHP
  • 重定向javascript函数,codeigniter
  • Eclipse PHP在新的Ubuntu安装上破解
  • 下一页按钮将我带到同一页面
  • 如何获得评级值并在K2中重置它
  • FOS用户捆绑包不会保留记录的会话
  • php中的memcached实现上升错误
  • 在简单的PHP代码中抛出T_Variable错误[重复]
  • 无法在流浪汉nginx中运行php artisan make
  • 如何缩进Laravel控制器,查看代码?
  • 使用PHP执行bat文件在端口上打印
  • PHP从字符串中获取特定的整数
  • Laravel:带有url参数的页面上的表单
  • 我无法显示JOIN查询的结果
  • 如何在PHP中创建电子商务应用程序? [关闭]
  • Laravel:如何验证模型是否已更改
  • 论证没有传递给特定的功能!

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华