4 Star 0 Fork 2

MegaData/cliprobe_curl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.php 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
evenvi 提交于 2016-04-26 15:16 . 头部调试临时去掉
<?php
/**
* 模拟wifi路由器发送虚拟身份数据
* 需要重新配置host地址
*
*/
require 'config.php';
$host = HOST_ADDR;
function request_by_curl($remote_server, $post_string) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $remote_server);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "AnyWiFi.com's CURL Example beta");
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$data = '"devmac":"48-5d-60-a3-bc-8a","climac":"c0-f2-fb-8c-c0-48","ssid":"","bssid":"","time":"1458968069","signal":"0"'.chr(13).chr(10).'"devmac":"48-5d-60-a3-bc-8a","climac":"ec-5a-86-c6-eb-5c","ssid":"","bssid":"","time":"1458968069","signal":"0","qq":"11111111111","qq":"333333333","taobao":"444444444"'.chr(10).'"devmac":"48-5d-60-a3-bc-8a","climac":"20-68-9d-c7-51-33","ssid":"","bssid":"","time":"1458968070","signal":"-65","qq":"22222221111","taobao":"dddddddd"';
echo request_by_curl('cliprobe_curl/index.php?action=reportclient', $data);
$ap_data = '"devmac":"48-5d-60-a3-bc-8a","bssid":"c0-f2-fb-8c-c0-48","ssid":"2182","channel":"1","encrypt":"WPA2","signal":"-83"'.chr(13).chr(10).'"devmac":"48-5d-60-a3-bc-88","bssid":"c0-f2-fb-8c-c0-48","ssid":"2182","channel":"1","encrypt":"WPA2","signal":"-83"';
echo request_by_curl('cliprobe_curl/index.php?action=reportap', $ap_data);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/evenvi/cliprobe_curl.git
[email protected]:evenvi/cliprobe_curl.git
evenvi
cliprobe_curl
cliprobe_curl
master

搜索帮助