To allow your Backend server APIs to access your PHP file, you can use the following headers in you PHP code:

If you want to allow a specific domain:

header("Access-Control-Allow-Origin: http://www.example.com");
header("Content-Type: application/json; charset=UTF-8");

 

Any domain:

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");

2zKoS8GsKK8