Forum Moderators: coopster
<code>
<html>
<body><?php
function spamcheck($field)
{
//eregi() performs a case insensitive regular expression match
if(eregi("to:",$field) ¦¦ eregi("cc:",$field))
{
return TRUE;
}
else
{
return FALSE;
}
}//if "email" is filled out, send email
if (isset($_REQUEST['email']))
{
//check if the email address is invalid
$mailcheck = spamcheck($_REQUEST['email']);
if ($mailcheck==TRUE)
{
echo "Invalid input";
}
else
{
//send email
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
mail("someone@example.com", "Subject: $subject",
$message, "From: $email" );
echo "Thank you for using our mail form";
}
}
else
//if "email" is not filled out, display the form
{
echo "<form method='post' action='mailform.php'>
Email: <input name='email' type='text' /><br />
Subject: <input name='subject' type='text' /><br />
Message:<br />
<textarea name='message' rows='15' cols='40'>
</textarea><br />
<input type='submit' />
</form>";
}
?></body>
</html>
</code>
You can check your reverse DNS at DNS Stuff [dnsstuff.com]
>Add this to your e-mail message:
><img src='mydomain.com/spyimage.php?email=$toemail' height=1 >width=1>
How to add this to my massage into my code?
So you have any idea to improve that?
For example, one host that I use has the RDNS pointed to one of the name servers that they use, which resolves to the correct server IP address. I just started using a dedicated server myself and changed the default RDNS (dub.example.com) to my new domain name (examples.com) without the "www" prefix and now DNS Stuff says that it is OK. (I only have one IP address for that server
1) In the DNS Hosting, they have serveral choise, do you thing the "Modify Mail Servers" is right one for me?
Modify Domain Servers (A Record)
The domain server or A record is a record which maps a name to an ip address. The domain server preceeds the domain as in the example below.
Eg.
sales.mydomain.com.au - sales is the name of the server
123.123.123.123 - the ip address which the server points to.
Modify Domain Aliases (CNAME Record)
The domain alias or CNAME record is basically an alias for an already existing domain server. The domain alias points directly to the domain servers ip address.
Eg.
sell.mydomain.com.au - domain alias
sales.mydomain.com.au - already existing domain server
Modify Mail Servers (MX Record)
The mail server record or MX record is used to forward all email for your domain onto a third party server.
Eg.
mail.freeemail.com.au - mail server already setup to accept email for your domain
2) and in Domain Server Management;
i can add add domain name server as following;
Name IP Address
Name (eg. www):
IP Address (eg. 123.123.123.123)
The above two part, do you think which part is right for me?