I have three PHP web sites that collect a small amount of form data. I want to set the action of these PHP pages to post to the ASP.NET (another instance) web site.
On the ASPX side, on page load, I'm looking for the form collection, and doing some stuff in SQL with it.
I thought that an ASPX page could just receive a form post from another web site? Am I way off base? Ideas?
The snippet of PHP code that does the post (I think)
$host = "www.myaspnetwebsite.com";
$port = 80;
$path = "/leads.aspx";
//send the server request
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $poststring . "\r\n\r\n");
//loop through the response from the server
while(!feof($fp)) {
$response .= fgets($fp, 4096);
}
//close fp - we are done with it
fclose($fp);
The form is on an HTML page with action of the PHP (snip) above. There's more in the file, but that looks like what's doing the post.
<form action="process-final.php" method="post" id="in-quote-form">