<?php
 if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
        header('Access-Control-Allow-Origin: *');
        header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS');
        header('Access-Control-Allow-Headers: token, Content-Type');
        header('Access-Control-Max-Age: 1728000');
        header('Content-Length: 0');
        header('Content-Type: text/plain');
        die();
    }

    header('Access-Control-Allow-Origin: *');
    header('Content-Type: application/json');
 
$HostUser ='zamindiyor_admin';
$HostPass ='nq=UI!c#IwyC';
$HostName ='localhost';
$DatabaseName ='zamindiyor_db';
$conn = mysqli_connect($HostName, $HostUser, $HostPass, $DatabaseName);
$javob = mysqli_query($conn,"SET NAMES utf8");
if ($conn->connect_error) {
 die("Connection failed: " . $conn->connect_error);
} 
?> 