It is a very handy thing to be able to send POST data from a form to a script. Normally you would do this using a form on an XHTML page like
Code:
<form action="/cgi-bin/form-control.php" method="post">
<input type="hidden" name="secretvar1" vale="date123" />
</form>
This would send the POST data secretvar1=date123
To do the same thing from php using curl you can use this code.
Code:
function Relay_Post($Post_Url){
$Curl_Session = curl_init($Post_Url);
curl_setopt ($Curl_Session, CURLOPT_POST, 1);
curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, "Name=$CLN_Name&Email=$CLN_Email&Message=$CLN_Message&FormName=$CLN_Form_Name&CallBack=$CLN_CallBack&CallNumber=$CLN_CallNumber&CallTime=$CLN_CallTime");
curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1);
curl_exec ($Curl_Session);
curl_close ($Curl_Session);
return;
}
This sends the variables Name=$CLN_Name&Email=$CLN_Email&Message=$CLN_Message&FormName=$CLN_Form_Name&CallBack=$CLN_CallBack&CallNumber=$CLN_CallNumber&CallTime=$CLN_CallTime to the $Post_Url