1
I have this code. However it is in JS and would like to play the values for a var in PHP and work better with the Front-End.
<script language="javascript">
var LIP_LowPrecision = false; //false = pede permissao pelo navegador, Maior Precisao | true = nao pede permissao, Menor Precisao
function LocalizaIP_done(ip_data){
if (!ip_data['error']) //esta linha eh um exemplo, deve trocá-la pelo programa que irá manipular os dados de Geolocalizacao
alert('Localizei IP: '+ip_data['city']+'-'+ip_data['state']+'-'+ip_data['country']+' (lat:'+ip_data['latitude']+',long:'+ip_data['longitude']+')');
}</script>
How do I do that? Ex.
$cidade = +ip_data['city']+;
@Danielomine did not find answer for this in the link above!
– user50712
I need to take these values because the way this one is showing me an Alert with the data, I just want to show in a variable so I can manipulate this data into chiasquer shapes!
– user50712
@Danielomine I understood, there is no simpler method just to store the values in a var?!
– user50712
Where it comes from
ip_data
and how it is invokedLocalizaIP_done()
?– Daniel Omine
@Danielomine is an API that generates a script only, I can’t say :/
– user50712
@Danielomine see the API link for better intender
– user50712