date_default_timezone_set('America/Sao_Paulo');
include 'conn.php';
$query = $mysql_adv->query("SELECT * FROM dados");
while($row = $query->fetch_array()){
$url = "https://maps.googleapis.com/maps/api/distancematrix/json?origins=";
$url .= $row['cep_adv']."&destinations=".$_GET['cep'];
$url .= "&language=pt&mode=car&key=AIzaSyDL6_dJ-Mbi_03_g6lHhWibxY22Z2UeYZQ";
$json = file_get_contents($url);
$json_data = json_decode($json, true);
}
I am doing a query with 30 ceps and this is very slow loading! about 1 minute, what can I do?