allow access origin php code example
Example 1: php access origin
<?php
header("Access-Control-Allow-Origin: *");
Example 2: php Access-Control-Allow-Origin
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
<?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");