[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 590: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 646: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 1068: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
Forums application et developpement informatique • localisation par script
Page 1 sur 1

localisation par script

Publié : Lun 3 Mars 2014 00:47
par philoxera
Bonjour,

J'aimerai savoir s'il est possible de récupérer les informations:
ville:
latitude:
longitude:


indépendamment en récupérant une valeur en retour… comme on peut le faire avec:

curl ipecho.net/plain
récupère l'@IP externe… facile pour affecter une variable dans un script…

En fait j'ai un programme qui change la config réseau de mon portable en fonction du lieu où je me trouve (le lieu étant recherché en fonction de l'@IP)

donc une commande du type:

IP_EXT étant mon @IP externe

curl http://www.fobec.com/apps/localiser-ip/ ... le/$IP_EXT
pourrait retourner la ville

curl http://www.fobec.com/apps/localiser-ip/ ... at/$IP_EXT
pourrait retourner la latitude

Donc monsieur fobec, ceci serait-il faisable?

Merci.

Re: localisation par script

Publié : Lun 3 Mars 2014 09:50
par Fobec
Bonjour,

pas de soucis, on propose un API pour ce type de requête.
Sans interface web, elle retourne uniquement le pays, la ville et les coordonnées GPS au format texte.
Est-ce que ça irait ?

Re: localisation par script

Publié : Lun 3 Mars 2014 10:42
par philoxera
Ohhh OUI

Comment faire?

Cordialement.

Re: localisation par script

Publié : Lun 3 Mars 2014 14:20
par Fobec
je vous ai envoyé les clés et un exemple sur votre boite mail.

N'hésitez pas à nous contacter pour plus d'info

Re: localisation par script

Publié : Lun 3 Mars 2014 17:55
par philoxera
superrrr… je regarde ça… quelle efficacité!

Re: localisation par script

Publié : Lun 3 Mars 2014 18:31
par philoxera
Ca y est mon script bash fonctionne… C'est nickel… encore merci fobec!

Re: localisation par script

Publié : Lun 3 Mars 2014 18:37
par Fobec
De rien !
ça nous plaisir d'avoir pu donner un coup de main avec l'api