Carey【胭脂扣】

【PHP开发篇】一个统计客户端商机提交的获取IP地址

1.对客服提交数据的ip地址记录。

获取ip地址的方法:

 

ajax提交的请求处理function

复制代码
 1     /*
 2      * ajax提交商机信息
 3      */
 4     public function ajaxPushAction(){
 5         $this->getRequest()->isPost() && $this->post = $this->getRequest()->getPost();
 6         if(!$this->post['t_name'] || !$this->post['t_tel']){
 7             $res = -1;
 8             Comm_Tools::renderJson($res);
 9         }
10         $getip = $this->getIP();
11         $this->post['getip'] = $getip;
12         $url = "http://home.demo.cn/web/buss/ajaxPushBusinessToQueue";
13         $res = Comm_Tools::curl($url, 'POST', $this->post);
14         Comm_Tools::renderJson($res);
15     }
复制代码

 

posted @   胭脂筘  阅读(123)  评论(0编辑  收藏  举报
编辑推荐:
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
阅读排行:
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· DeepSeek+PageAssist实现本地大模型联网
· 手把手教你更优雅的享受 DeepSeek
· Java轻量级代码工程
· 从 14 秒到 1 秒:MySQL DDL 性能优化实战
点击右上角即可分享
微信分享提示