Compare commits

...

1 Commits

Author SHA1 Message Date
v2board
43134f9fe8 Update exchange rate API URL in Helper class 2023-12-19 01:27:12 +08:00

View File

@ -36,9 +36,9 @@ class Helper
public static function exchange($from, $to) public static function exchange($from, $to)
{ {
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from); $result = file_get_contents("https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/" . $from . "/" . $to . ".json");
$result = json_decode($result, true); $result = json_decode($result, true);
return $result['rates'][$to]; return $result[$to];
} }
public static function randomChar($len, $special = false) public static function randomChar($len, $special = false)