I'm using php to process a form in Flash. I can't find a solution from the Flash side for my problem so I'm hoping there might be a PHP solution.
This flash form is being pointed at by multiple subdomains which are all being forwarded to the same exact html, swf and php files. I really need to know from which subdomain the form was filled out from each time.
So say I have mysite.com site1.mysite.com site2.mysite.com all pointed to the same files. How can I get the PHP to add "this was sent from site2.mysite.com" to the message of the email that is sent to me?
If anyone can let me know if it's possible and what I'd need to add to my PHP it would be greatly appreciated. The following is the basic structure of what I'm using
<?php
//echo phpinfo();
$name = "";
$email = "";
$name = $REQUEST['name'];
$email = $REQUEST['email'];
$to = "myemail@hotmail.com";
$subject="Website Form";
$msg = "$name is my name\n";
$msg .= "$email is my email address\n";
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-Type: text/plain; charset=iso-8859-1\r\n";
$header .= "From: ".$email."\r\n";
$header .= "Reply-To : ".$email."\r\n";
$header .= "Return-Path : ".$email."\r\n";
$header .= "X-Priority: 1\r\n";
$header .= "X-MSMail-Priority: High\r\n";
$header .= "X-Mailer: PHP4\r\n";
mail($to, $subject, $msg, $header);
echo "Message Sent";
?>