1 Star 1 Fork 2

feng/诸暨三步婚恋

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
shiyan.php 3.29 KB
一键复制 编辑 原始数据 按行查看 历史
675467511@qq.com 提交于 2018-09-18 11:55 . 123
<?php
/**
* Created by PhpStorm.
* User: admin
* Date: 2016/4/23
* Time: 21:56
*/
$url ="http://localhost/index.php";
function concat(array $param)
{
ksort($param);
$first = '';
foreach ($param as $key => $val) {
if(is_array($val)) {
$first .= concat($val);
continue;
}
if(!empty($val)) {
$first .= $val;
}
}
return $first;
}
function post_curl($url,$post_data){
$ch = curl_init ();
// print_r($ch);
curl_setopt ( $ch, CURLOPT_URL, $url );
curl_setopt ( $ch, CURLOPT_POST, 1 );
curl_setopt ( $ch, CURLOPT_HEADER, 0 );
curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $post_data );
$return = curl_exec ( $ch );
curl_close ( $ch );
return $return;
}
$param = array();
$param['apiCode']="_System/sendMessage_001";
$param['mobile']='18368169357';
//$param['code']="5478";
//$param['password']="123456";
//$param['confirm']="123456";
//$param['realname']="张三";
//$param['yqm']="39801";
//$param['json']='[{"id_num":"420704199002045054","mobile":"15072928719","name":"刘司机","good_num":"122222222222","license":"豫LL7951"},{"id_num":"420704199002045054","mobile":"15072928719","name":"刘司机","good_num":"122222222222","license":"豫LL7951"}]';
//$param['car_mobile']="15072928719";
//$param['json']='[{"unload":"株洲","unload_address":"湖南长沙","lat":"123","lon":"111","take_mobile":"15072928719"},{"unload":"111","unload_address":"111","lat":"123","lon":"111","take_mobile":"15072928718"}]';
//$param['size']="1000";
//$param['json']='[{"unload":"长沙","unload_address":"湖南省长沙市","lat":"123","lon":"","take_mobile":"15072928719"},{"unload":"株洲","unload_address":"湖南省株洲市","lat":"123","lon":"","take_mobile":"15072928719"}]';
//$param['car_mobile']="15072928719";
//$param['car_name']="时间";
//$param['mobile']="15072928719";
//$param['loading']="湖南省长沙市";
//$param['lon']="1";
//$param['lat']="222";
//$param['create_time']="2018-03-20 15:50:00";
//$param['mileage']="40";
//$param['type']="2";
//$param['weight']="90";
//$param['surplus_weight']="90";
//$param['good_price']="12";
//$param['account_type']="线下结算";
//$param['remark']="这次货物非常急";
//$param['mileage']="120.1公里/2.0小时";
//$param['use_time']="2017年01月01日 13点";
//$param['type']="汽油";
//$param['weight']="80";
//$param['good_price']="12";
//$param['account_type']="线下结算";
//$param['remark']="这次货比较紧急,吨数比较多,优先车队来做,个人请勿抢单。这次货比较紧急,吨数比较多,优先车队来做,个人请勿抢单。";
//$param['unload']="长沙,株洲";
//$param['unload_address']="湖南省长沙市,湖南省株洲市";
//$param['front_img']="/Uploads/Download/2017-09-11/59b63a19a6582.jpg";
//$param['verso_img']="/Uploads/Download/2017-09-11/59b63a19a6582.jpg";
//$param['permit']="/Uploads/Download/2017-09-11/59b63a19a6582.jpg";
//$param['hand_img']="/Uploads/Download/2017-09-11/59b63a19a6582.jpg";
//$param['userToken'] ="cb97a780c081a49154bed3aa50842ff4";
//$sign = concat($param)."1e56c95504a9a846e4c7043704a20f25";
//$param['token'] = md5($sign);
$post_data['json'] = json_encode($param);
$res = post_curl($url,$post_data);
print_r($res);
print_r(json_decode($res,true));
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/dongqiangfeng/hunlian.git
git@gitee.com:dongqiangfeng/hunlian.git
dongqiangfeng
hunlian
诸暨三步婚恋
master

搜索帮助