mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: exchange api
This commit is contained in:
parent
c7d7dfda28
commit
9c04f75b85
@ -25,7 +25,7 @@ class Helper
|
|||||||
|
|
||||||
public static function exchange($from, $to)
|
public static function exchange($from, $to)
|
||||||
{
|
{
|
||||||
$result = file_get_contents('https://api.exchangeratesapi.io/latest?symbols=' . $to . '&base=' . $from);
|
$result = file_get_contents('https://api.exchangerate.host/latest?symbols=' . $to . '&base=' . $from);
|
||||||
$result = json_decode($result, true);
|
$result = json_decode($result, true);
|
||||||
return $result['rates'][$to];
|
return $result['rates'][$to];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user