allow origin in 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']}");