title: how to call an api via php and get a json file from it
body: <p>I want to check all of the requested urls and if the url contains "video" folder in it, redirect it to an API file. then the API gives me a json files which only contains "respond:true" or "respond:false". In case of having respond:true in the json file the url must be showed and if the json file contains respond:false a predefined simple 403 page must be showed to the user.</p>
  
  <p>I know that the fist part is possible with a simple code in .htaccess file like this: </p>
  
  <pre><code>RewriteRule ^your/special/folder/ /specified/url [R,L]
  </code></pre>
  
  <p>But I don't know how to do the second part. I mean how to get the result of API, which is in form of a json file and check it.</p>