Prix Actuelle des Crypto Monnaie
[insert_php]
if (isset($_GET[“currency”]) OR isset($_GET[“limit”])){
if($_GET[“currency”] == “usd”){
$limit = $_GET[“limit”];
$url = “https://api.coinmarketcap.com/v1/ticker/?convert=USD&limit=”.$limit.””;
$currency = “usd”;
$currency_symbol = “$”;
}
else{
$limit = $_GET[“limit”];
$url = “https://api.coinmarketcap.com/v1/ticker/?convert=EUR&limit=”.$limit.””;
$currency = “eur”;
$currency_symbol = “€”;
}
}
else{
$limit = $_GET[“limit”];
$url = “https://api.coinmarketcap.com/v1/ticker/?convert=EUR&limit=”.$limit.””;
$currency = “eur”;
$currency_symbol = “€”;
}
$json = file_get_contents($url);
$json_data = json_decode($json, true);
[/insert_php]
# | Nom | Market Cap | Prix | Volume (24h) | Disponible | 1h | 24h | 7 Jours |
---|---|---|---|---|---|---|---|---|
“.$row[“rank”].” | “.number_format($row[“market_cap_”.$currency.””], 2, ‘,’, ‘.’).” “.$currency_symbol.” | “.number_format($row[“price_”.$currency.””], 2, ‘,’, ‘.’).” “.$currency_symbol.” | “.number_format($row[“24h_volume_”.$currency.””], 2, ‘,’, ‘.’).” “.$currency_symbol.” | “.number_format($row[‘available_supply’], 2, ‘,’, ‘.’).” “.$row[‘symbol’].” | “.$onehour.” % | “.$twentyfourhours.” % | “.$oneweek.” % |