Combo de paises mediante geonames


/ Published in: PHP
Save to your folder(s)

aun no acabado


Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. $xmlpaises = 'http://ws.geonames.org/countryInfo?lang=es';
  4. // http://ws.geonames.org/children?geonameId=2510769&lang=es
  5.  
  6.  
  7. $paises = simplexml_load_file($xmlpaises);
  8. $i = 0;
  9. foreach ($paises->country as $pais) {
  10. echo $pais->isoNumeric.' - '.$pais->geonameId.' - '.$pais->countryName.'</br>';
  11. $i++;
  12. }
  13. echo $i;
  14.  
  15.  
  16.  
  17. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.