I think, we would need cURL only for cross domain applications. I mean if I use pages stored under same domain then I should simply use POST rather than cURL.
Is this right?
Also,
For example: how do i check if username=1 and password=2 in check.php page and return TRUE or FALSE?
<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.mysite.com/check.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt(CURLOPT_USERPWD, '[username]:[password]')
$data = curl_exec();
curl_close($ch);
?>