Let say client side making the first call the my API . How I process the first API call?
How should I intercept the http://www.mycom.com/api/GET?name=simple call inside api.php?
client.php
<?php
$ch = curl_init();
$url = 'http://www.mycom.com/api/GET?name=simple';
curl_setopt($ch, CURLOPT_GET, true);
curl_setopt($ch, CURLOPT_URL, $url);
$json = curl_exec($ch);
echo "\n".$json."\n";
?>
api.php what’s inside?
<?php
?>
try adding the following to your .htaccess file
when a client calls “api/GET?name=simple” this would be the same as “api.php?mode=GET&name=simple”.