一个电影api的合法请求的生成

$check = self::USERNAME.$condition['userphone'].$condition['showid'].$condition['seats'].self::PASSWORD;
#生成验证的key
$checkcode = strtoupper(md5($check));
$seats = str_replace(',','%2C',$condition['seats']);
$url = self::URLTWO.'?cmd=lockSeat&user='.self::USERNAME.'&userphone='.$condition['userphone'].'&showid='.$condition['showid'].$qq.'&seats='.$seats.'&checkcode='.$checkcode;
$data = $this->postData($url);
$result = $this->xml2json($data,true);

 

posted @ 2017-03-10 16:29  wahgon  阅读(376)  评论(0编辑  收藏  举报