首页 生男生女 生男生女示例代码 生男生女对照表[PHP]

生男生女对照表示例代码[PHP]

作者: 阅读数:1677 上传时间:2016-03-10

生男生女对照表

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/snsn/all?appkey=$appkey";
$result = curlOpen($url, ['ssl'=>true]);

$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));

if($jsonarr['status'] != 0)
{
    echo $jsonarr['msg'];
    exit();
}

$result = $jsonarr['result'];
foreach($result as $key=>$val)
{
    echo $key.'
'; foreach($val as $v) { echo '  '.$v['month'].' '.$v['sex'].'
'; } }