$configPath = substr(__DIR__,0,strpos(__DIR__,"/public_html"))."/config.php"; include_once($configPath); if (!empty($_SESSION["utente"]) && $_SESSION["utente"]->permission("albo.consip") && (!empty($_GET["cpv"]))) { $ch = curl_init(); $query = http_build_query([ 'resource_id' => $_GET["idSorgente"], 'q' => json_encode(array('Codice_CPV' => $_GET["cpv"])), 'limit' => 999999999 ]); $url = "https://dati.consip.it/api/action/datastore_search?" . $query; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); $result = curl_exec($ch); if(!curl_errno($ch)) { $result = json_decode($result,true); if (!empty($result["result"]["records"])) { ?>
| = str_pad($fornitore["Partita_IVA"],11,"0",STR_PAD_LEFT) ?> | = $fornitore["Denominazione_Fornitore"]; ?> | = $fornitore["Prodotto"]; ?> |