代码拉取完成,页面将自动刷新
<?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));
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。