<?php
$servername = "db02.noc24online.net"; 
$username = "gyxbqlbq_pcdnf2k";  
$password = "UEROY20scHeJ";  
$dbname = "gyxbqlbq_pcdnfma";

 $conn = mysqli_connect($servername, $username, $password, $dbname);

mysqli_set_charset($conn,'utf8');
$sqlCheckUser = "SELECT * FROM `poster` ORDER BY id DESC"; 
$run1 = mysqli_query($conn, $sqlCheckUser);
 
while ($datas1=mysqli_fetch_assoc($run1)) {
   
  $item[]=$datas1;
    $jsonEncode=json_encode(array('contents'=>$item));

}

echo $jsonEncode;
 
  
?>