首页 企业工商信息 企业工商信息示例代码 企业工商信息查询[PHP]

企业工商信息查询示例代码[PHP]

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

企业工商信息查询

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$company = '杭州网尚科技有限公司'; //utf-8 以下三项任选一个
$creditno = '';
$regno = '';
$url = "https://api.jisuapi.com/enterprise/query?company=$company&creditno=$creditno®no=$regno&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'];
//var_dump($result);
$basic = $result['basic'];
$keyperson = $result['keyperson'];
$changerecord = $result['changerecord'];
$shareholder = $result['shareholder'];

echo $basic['name'].' '.$basic['type'].' '.$basic['regcapital'].' '.$basic['scope'].' '.$basic['startdate'].' '.$basic['enddate'].'
'; echo $basic['regorgan'].' '.$basic['legalperson'].' '.$basic['approvaldate'].' '.$basic['regdate'].' '.$basic['canceldate'].'
'; echo $basic['status'].' '.$basic['orgno'].' '.$basic['creditno'].' '.$basic['province'].' '.$basic['city'].' '.$basic['regno'].' '.$basic['regaddress'].'
'; foreach($keyperson as $val) { echo $val['name'].' '.$val['position'].'
'; } foreach($changerecord as $val) { echo $val['name'].' '.$val['beforecontent'].' '.$val['aftercontent'].' '.$val['changedate'].'
'; } foreach($shareholder as $val) { echo $val['name'].' '.$val['cardtype'].' '.$val['cardno'].' '.$val['subcapital'].' '.$val['paidcapital'].'
'; }