<?php
/**
 * Created by PhpStorm.
 * User: Joseg
 * Date: 29/4/2018
 * Time: 1:56 AM
 */
http_response_code(200);
header("Access-Control-Allow-Headers: Authorization, Content-Type");
header("Access-Control-Allow-Origin: *");
header('content-type: application/json; charset=utf-8');
if (isset($_SERVER['HTTP_ORIGIN'])) {
    header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"
        ,'Access-Control-Allow-Credentials: true'
        ,'Access-Control-Max-Age: 86400');
}
$data = array("message" => "Ya existe");
echo json_encode($data);