Résolu Reponse apres decodage json

SoCoolMen

Espion
Premium
Inscription
15 Novembre 2011
Messages
3 012
Réactions
1 064
Points
22 509
RGCoins
0
Salut j'aurais besoin d'un coup de main

Avec l'API pokesniper je voudrais faire mon site de coordonnées
Mais apres avoir galerer a decoder l'API walky et rivals m'ont donné ce code
PHP:
<?php

$json = file_get_contents('http://pokesnipers.com/api/v1/pokemon.json');
$name = json_decode($json, true);
$name = $name['results'];

foreach ($name as $key => $pokemon) {
    var_dump($pokemon['name']);
    var_dump($pokemon['coords']);
}
?>

Ceux qui me repond :
int(254085) string(7) "Pidgeot" string(19) "53.062517,-3.201328" int(253772) string(7) "Slowbro" string(21) "-33.856092,151.205736" int(254149) string(6) "Fearow" string(20) "43.775405,-79.337446" int(253770) string(10) "Tentacruel" string(21) "-33.881988,151.189709" int(254279) string(6) "Tauros" string(21) "39.726053,-104.991049" int(254186) string(6) "Fearow" string(20) "43.660283,-79.377837" int(254286) string(9) "Poliwhirl" string(19) "41.882909,-87.63757" int(254269) string(7) "Tangela" string(21) "-23.529221,-46.633768" int(254009) string(6) "Tauros" string(20) "40.837268,-73.941722" int(254157) string(6) "Kabuto" string(21) "-34.548267,-58.463757" int(253995) string(8) "Primeape" string(20) "19.399703,-99.127153" int(253968) string(6) "Pinsir" string(21) "20.674225,-103.344064" int(254083) string(7) "Tangela" string(21) "37.770778,-122.466405" int(254040) string(9) "Nidoqueen" string(20) "40.768597,-74.038779" int(254180) string(4) "Onix" string(19) "43.63469,-79.398334" int(254193) string(8) "Clefable" string(20) "22.362203,114.120478" int(254037) string(8) "Mr. Mime" string(19)
Comment puis je exploiter ceci D:
 

Rivals

Ancien staff
Inscription
27 Août 2016
Messages
1 706
Réactions
897
Points
13 104
RGCoins
0
Salut j'aurais besoin d'un coup de main

Avec l'API pokesniper je voudrais faire mon site de coordonnées
Mais apres avoir galerer a decoder l'API walky et rivals m'ont donné ce code
PHP:
<?php

$json = file_get_contents('http://pokesnipers.com/api/v1/pokemon.json');
$name = json_decode($json, true);
$name = $name['results'];

foreach ($name as $key => $pokemon) {
    var_dump($pokemon['name']);
    var_dump($pokemon['coords']);
}
?>

Ceux qui me repond :
int(254085) string(7) "Pidgeot" string(19) "53.062517,-3.201328" int(253772) string(7) "Slowbro" string(21) "-33.856092,151.205736" int(254149) string(6) "Fearow" string(20) "43.775405,-79.337446" int(253770) string(10) "Tentacruel" string(21) "-33.881988,151.189709" int(254279) string(6) "Tauros" string(21) "39.726053,-104.991049" int(254186) string(6) "Fearow" string(20) "43.660283,-79.377837" int(254286) string(9) "Poliwhirl" string(19) "41.882909,-87.63757" int(254269) string(7) "Tangela" string(21) "-23.529221,-46.633768" int(254009) string(6) "Tauros" string(20) "40.837268,-73.941722" int(254157) string(6) "Kabuto" string(21) "-34.548267,-58.463757" int(253995) string(8) "Primeape" string(20) "19.399703,-99.127153" int(253968) string(6) "Pinsir" string(21) "20.674225,-103.344064" int(254083) string(7) "Tangela" string(21) "37.770778,-122.466405" int(254040) string(9) "Nidoqueen" string(20) "40.768597,-74.038779" int(254180) string(4) "Onix" string(19) "43.63469,-79.398334" int(254193) string(8) "Clefable" string(20) "22.362203,114.120478" int(254037) string(8) "Mr. Mime" string(19)
Comment puis je exploiter ceci D:
Comment ça exploiter ceci ? Tu veux faire quoi ? :mmh:
 
Haut