Download public/api/posicion.php from chartManD/turitezo: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/spaces/chartManD/turitezo/resolve/main/public/api/posicion.php
- Command line
-
hf download hf://spaces/chartManD/turitezo/public/api/posicion.php
-
curl -L -o posicion.php https://huggingface.co/spaces/chartManD/turitezo/resolve/main/public/api/posicion.php
581 Bytes
| $noId = ["message" => "Error en la espcificacion del lugar"]; | |
| if (!isset($_GET["id_lugar"])) { | |
| echo json_encode($noId); | |
| die(); | |
| } | |
| $idLugar = intval($_GET["id_lugar"], 10); | |
| if (!$idLugar) { | |
| echo json_encode($noId); | |
| die(); | |
| } | |
| require_once "../../controllers/controller_locate.php"; | |
| $objConLocate = new ControllerLocate(); | |
| $arrLocate = $objConLocate->getPlaceLocate($idLugar); | |
| if (isset($arrLocate['message'])) { | |
| echo json_encode($arrLocate); | |
| die(); | |
| } else { | |
| $locate = $arrLocate[0]; | |
| echo json_encode($locate->getCoordinates()); | |
| die(); | |
| } |