<?php
header('Content-type: text/json');
require "/var/www/0ba34f47-a796-4a62-b8b8-34a417dea8ad/public_html/config.php";
$conecta = new mysqli(BD_HOST,BD_USUARIO,BD_SENHA,BD_BANCO);

$i = 1;
$sql = $conecta->query("SELECT * FROM social WHERE status = '1' ORDER BY id ASC");
while ($consulta = $sql->fetch_assoc()){
$evNum = 'social_'.$i;
$social[$evNum]['id'] = $consulta['id'];
$social[$evNum]['icone'] = $consulta['icone'];
$social[$evNum]['url'] = $consulta['url'];
$i = $i + 1;}

$json_string = json_encode($social);

echo $json_string;
?>