//车号牌是否绑定城市大脑,提供查询,二维码查询页面从电脑端打开,输入手机号后提交一个车号查询,F12抓包,可以得到 sign,cipher,token等用户固定信息.
<?php header("Content-Type: text/html; charset=utf-8"); if(isset($_REQUEST["plateNumber"])){ $plateNumber = $_REQUEST["plateNumber"]; }else{ $plateNumber = '鄂QL6T61'; } $data =array( "sign" => "XXXXXX", "cipher" => "XXXXXXXX", "plate" => $plateNumber, "token" => "XXXXXXXXXX" ); function resultJosn($url,$data){ $query = http_build_query($data); $result = file_get_contents($url.'?'.$query); return $result; } $jieguo = resultJosn($url='https://web.hzcbparking.com/hzCityheadService/apph5function/getPlateState.do',$data); echo $jieguo; echo "<br><br>"; $json = json_decode($jieguo,true);//将json解析成数组 //return $json; $desc=$json['desc']; echo "查询结果:".$desc; ?> <br><br> 查询例子:<br> <a href="?plateNumber=鄂QL6T61">鄂QL6T61</a> <a href="?plateNumber=浙G219CN">浙G219CN</a> <br><br> <form action=""> <input name="plateNumber" type="text" maxlength="11" value="浙AAAAAA" onfocus="this.value=''" onblur="if(this.value==''){this.value='请输入车号'}"/> <input type="submit" value="查询是否绑定城市大脑"> </form>