title: PHP: send post request with cURL, but to a local file. not with URL
body: <p>I had a simple php script as backend for my mobile app,
  There is an index.php and api.php , requests were sent to index.php, then index.php was sending a post request to api.php through cURL ( post request to <a href="https:///www.samplewebsite.com/service/api.php" rel="nofollow noreferrer">https:///www.samplewebsite.com/service/api.php</a> ) and printing the result from that.</p>
  
  <p>Now the problem is, I had to change permissions for api.php, and it cannot be accessed via url. is there anyway to send post data to it without url? index.php and api.php are in same folder.</p>
  
  <p>api.php is the php crud class (<a href="https://github.com/mevdschee/php-crud-api" rel="nofollow noreferrer">https://github.com/mevdschee/php-crud-api</a>) it's kinda complicated class, so i didn't find it easy to modify it. I thought it might be better to not to touch that file, instead finding someway to send post requests with that.</p>