PHP code example of linqiao / php-addtran
1. Go to this page and download the library: Download linqiao/php-addtran library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
linqiao / php-addtran example snippets
composer
// composer 方式安装
// include './vendor/autoload.php';
use Linqiao\Addtran\BankCardInfo;
use Linqiao\Addtran\PhoneRegion;
use Linqiao\Addtran\IpRegion;
// 非 composer 方式安装的,引入文件
Phone(17630257215)->getRegion());
$ip = new IpRegion();
print_r($ip->setIp("123.15.54.250")->getIpAddress());
// Output;
bank info:
array(5) {
["card_type_name"]=>
string(9) "信用卡"
["bank_name"]=>
string(24) "中国邮政储蓄银行"
["bank_code"]=>
string(4) "PSBC"
["bank_img"]=>
string(51) "https://apimg.alipay.com/combo.png?d=cashier&t=PSBC"
["cart_id"]=>
int(6236984981800029137)
}
ip address:
array(4) {
["tel_address"]=>
string(20) "河南 新乡 联通"
["province"]=>
string(6) "河南"
["city"]=>
string(6) "新乡"
["sp"]=>
string(6) "联通"
}
phone address:
string(26) "中国 河南省 郑州市"
string(6) "中国"
string(9) "河南省"
string(9) "郑州市"