cURL is resubmitting the page
Hello,
I have a strange problem with using cURL on PHP. After cURL submits the data to another URL (ASP page), and the script reaches the bottom of the main condition, the whole page is re-submitted again.
And I know, it is re-submitting, because I have a prevention measure in place "Attempted Duplicate transaction", when the same Ref. comes in again for re-insert into mySQL database.
Has anyone come across a similar problem ?
I have been trying to resolve this since last 2 hrs, and can't get any clue.
This is the general setup of my cURL call.
$ch = curl_init();
$callURL = "http://the-address-to-send-data" ;
curl_setopt ($ch, CURLOPT_HEADER, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_URL, "$callURL");
// Make the request
$TransASPresponse = curl_exec($ch);
// Close the curl session
curl_close ($ch);
Any ideas on why could this be happening ?
Thanks,
Bij.
|