nguyenanhung/utils-gold-price

Utils API: 获取金价

v1.0.1 2022-06-29 02:55 UTC

This package is auto-updated.

Last update: 2024-09-22 14:26:48 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version composer.lock License

Utils: 金价

从一些网站上获取金价数据的函数

SJC金价

从SJC网站提取数据的函数:http://sjc.com.vn/price/

<?php
require_once __DIR__ . '/vendor/autoload.php';
$price = new \nguyenanhung\Utils\GoldPrice\GoldPriceSJC();

// Parse dữ liệu từ API ngân hàng
$parse = $price->parseDataGoldPrice();
// Hiển thị dữ liệu dạng JSON
echo $price->toJson();

// Hiển thị dữ liệu thô

echo "<pre>";
print_r($price->getResponse());
echo "</pre>";

联系信息

如有任何需要讨论和了解的信息,请按照以下信息联系

来自河内的爱 <3