Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nome = $_POST['nome'];
- $cognome = $_POST['cognome'];
- $tel = $_POST['tel'];
- $indirizzo = $_POST['indirizzo'];
- //$api = ce082e8dbc88c30d7f2b66d97e3ebeec50145e48;
- //echo 'https://maps.query.city/user/maps/' . $nome . $cognome . $api ;
- $url1 = 'https://maps.query.city/user/maps/';
- <iframe src="'.$url1 '" style="width:250px;height:250px;overflow:scroll;" id="MyFrame"></iframe>;
- $url = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?address=".urlencode($indirizzo)."&sensor=false"."&key=AIzaSyBaAtkGMr1cYHdBV2GMHG_f0GPVHRHX_fc");
- $response = json_decode($url);
- if ($response->status == 'OK') {
- $latitude = $response->results[0]->geometry->location->lat;
- $longitude = $response->results[0]->geometry->location->lng;
- echo 'Nome: ' . $nome;
- echo '<br />';
- echo 'Cognome: ' . $cognome;
- echo '<br />';
- echo 'Telefono: ' . $tel;
- echo '<br />';
- echo 'Latitude: ' . $latitude;
- echo '<br />';
- echo 'Longitude: ' . $longitude;
- } else {
- echo $nome . $cognome .$response->status;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement