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]

[insert_php]
foreach($json_data as $row) {
if($row[“percent_change_1h”] < 0){ $onehour = "“.$row[“percent_change_1h”].”“;
}
else if($row[“percent_change_1h”] > 0){
$onehour = ““.$row[“percent_change_1h”].”“;
}
else if($row[“percent_change_1h”] == 0){
$onehour = [“percent_change_1h”];
}
if($row[“percent_change_24h”] < 0){ $twentyfourhours = "“.$row[“percent_change_24h”].”“;
}
else if($row[“percent_change_24h”] > 0){
$twentyfourhours = ““.$row[“percent_change_24h”].”“;
}
else if($row[“percent_change_24h”] == 0){
$twentyfourhours = [“percent_change_24h”];
}
if($row[“percent_change_7d”] < 0){ $oneweek = "“.$row[“percent_change_7d”].”“;
}
else if($row[“percent_change_7d”] > 0){
$oneweek = ““.$row[“percent_change_7d”].”“;
}
else if($row[“percent_change_7d”] == 0){
$oneweek = [“percent_change_7d”];
}

echo “

“;
echo “

“;
echo”

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
echo “

“;
}
[/insert_php]

# Nom Market Cap Prix Volume (24h) Disponible 1h 24h 7 Jours
“.$row[“rank”].” ".$row["id"]." “.$row[“name”].” “.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.” %
>