title: Request forbidden while accessing github api on php program
body: <p>I'm reading the past of the <a href="https://stackoverflow.com/a/21384582/6532249">question (Request forbidden while accessing github api on node.js program)</a>, but still does not solve the problem.</p>
  
  <h2>PHP code</h2>
  
  <pre class="lang-php prettyprint-override"><code>$ch = curl_init();
  curl_setopt_array($ch, [
      CURLOPT_URL =&gt; "https://api.github.com/markdown/raw",
      CURLOPT_HEADER =&gt; [
          "Accept: application/vnd.github.v3+json",
          "Content-Type: text/plain",
          "User-Agent: mfmfneko"
      ],
      CURLOPT_RETURNTRANSFER =&gt; true,
      CURLOPT_POST =&gt; true,
      CURLOPT_POSTFIELDS =&gt; "# Hello World!"
  ]);
  $response = curl_exec($ch);
  curl_close($ch);
  
  print($response);
  </code></pre>
  
  <h2>Response</h2>
  
  <pre><code>HTTP/1.0 403 Forbidden
  Cache-Control: no-cache
  Connection: close
  Content-Type: text/html
  
  Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.
  </code></pre>