Arshad Mehmood

Search the blog

    Allow CORS - Cross origin resource sharing

    php1 min read

    When writing APIs in PHP, you want other domains to access your server and you can enable it on your sever with this simple header:

    <?php
    header('Access-Control-Allow-Origin: *');
    ?>