So I had a page which I absolutely could not change or rename. The challenge was, this page would normally receive POST data, and I had to pass or relay this POST data to another page, which resided on another domain. I tried .htaccess, but that didn’t work, so I figured that I had to do some programming. It was simple enough with the curl library to do so, and here it is – The method to pass POST data from page to page:
$todo = "";while (list($name, $value) = each($HTTP_POST_VARS)) {
$todo.=$name."=".$value."&";
}$ch = curl_init('http://path.to/your/filename.php');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $todo);
curl_exec ($ch);
curl_close ($ch);
?>
Done!
Similar Posts:
- Htaccess Problem With HTTP Form Posts
- How To Create And Use .htaccess Files For Apache Web Server in Microsoft Windows
- Edit .htaccess to increase PHP’s max file upload
- Change WordPress Category / Archive Page From Full Content to Excerpt
- How To Add Cron or Cron-like Jobs To Mac (With MAMP or Otherwise)


Leave a Reply