title: trying to get json data from api .... I'm on localhost
body: <p>I am trying to get json data from <a href="http://gulf-shade.com/test/asd.php" rel="nofollow noreferrer">http://gulf-shade.com/test/asd.php</a> and it always says  No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>' is therefore not allowed access.
  here is my code:</p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open("GET", "http://gulf-shade.com/test/asd.php", true);
  xhr.responseType = 'json';
  xhr.onreadystatechange = function () {
      if (xhr.readyState != 4 || xhr.status != 200) return;
      result = xhr.response.data;
           cosnole.log(result);
      }
  };
  xhr.send();
  </code></pre>