How do I allow get requests - 403 forbidden error
<p>I'm making an ajax request to my images directory.  This works well on localhost, but when I put it online I get a 403 (Forbidden) error.  How do I allow get requests? </p>

<pre><code>    $.ajax({    
        url: url,
        success: function(data) {
        var parser = new DOMParser(),
            doc = parser.parseFromString(data, 'text/html');
        var rows = doc.querySelector('table').querySelectorAll('tr');
        for (var i=0;i&lt;rows.length;i++) {
            if (rows[i].children[2]) {
                var img = rows[i].children[2].children[0].getAttribute("href"); 
                if(img.match(/\.(jpeg|jpg|gif|png)$/) != null){
                    var html = '&lt;li id="" style="background-image: url('+img+')"&gt;&lt;/li&gt;';            
                    $('#nikoSlider ul').append(html)
                } else { console.log("This is not a valid image type: " + img) }
            }
        }
        nikoSlider();
        }
    });
</code></pre>

<p>Can I use something like <code>header('Access-Control-Allow-Origin: *');</code> in a php file.  </p>