[PHP]CORS

public static function set_header_for_cors($domain = '*')
{
    header("Access-Control-Allow-Origin: ".$domain);
    header("Access-Control-Allow-Methods: GET, POST");
    header("Access-Control-Allow-Headers: Accept, Content-Disposition, Content-Type, Content-Length, Accept-Encoding");
}