首页 电影影讯 电影影讯示例代码 电影放映的电影院[PHP]

电影放映的电影院示例代码[PHP]

作者: 阅读数:1615 上传时间:2018-07-11

电影放映的电影院

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$date = '2018-06-16'; //日期
$cityid = '1'; //当前城市的cityid 任选
$city = '北京'; //当前城市 任选
$movieid = '137363';
$url = "https://api.jisuapi.com/movie/movietheater?date=$date&cityid=$cityid&city=$city&movieid=$movieid&appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}
$result = $jsonarr['result'];
echo $result['movieid'].' '.$result['moviename'].' '.$result['city'].' '.$result['cityid'].' '.$result['date']. '
'; foreach ($result['list'] as $val){ echo $result['theatername'].' '.$result['address'].' '.$result['issale'].' '.$result['minprice'].' '.$result['theaterid'].' '.$result['lat'].' '.$result['lng'].' '.$result['logo']. '
'; }