1. Use the PHP mail function to send email
$to = "viralpatel.net@gmail.com"; $subject = "Viralpatel.net"; $body = "Body of your message" Here's can use HTML too. E.g.﹤br﹥﹤b﹥bold﹤/b﹥ "; $headers = "From:peterrn"; $headers. = "REPLY-TO:INFO@YOURSITE.COMRN"; $headers. = "RETURN-PATH:INFO@YOURSITE.COMRN"; $headers. = "x-mailer:php5n"; $headers. = ' mime-version:1.0 '. "N"; $headers. = ' content-type:text/html; Charset=iso-8859-1 '. "RN"; Mail ($to, $subject, $body, $headers); ? ﹥ |
2.64-bit encoding and decoding in PHP
3. Get the remote IP address
function Getrealipaddr () {if (!empty ($_server[' http_client_ip ')) //check IP from share internet{$ip =$_server[' Http_client_ip '];} ElseIf (!empty ($_server[' http_x_forwarded_for ')) //to Check IP is pass from proxy{$ip =$_server[' http_x_forwarded _for '];} else{$ip =$_server[' remote_addr '];} return $IP;} |
4. Date formatting
function Checkdateformat ($date) {//match The format of the Dateif (Preg_match ("/^ ([0-9]{4})-([0-9]{2})-([0-9]{2}) $/", $ Date, $parts) {//check Weather the date is valid of Notif (Checkdate ($parts [2], $parts [3], $parts [1])) return true; Elsereturn false;} Elsereturn false;} |
5. Verify Email
$email = $_post[' email '];if (Preg_match ("~ ([a-za-z0-9!#$%& ') *+-/=?^_`{|} ~]) @ ([a-za-z0-9-]). |
1
http://www.bkjia.com/PHPjc/446627.html www.bkjia.com true http://www.bkjia.com/PHPjc/446627.html techarticle 1, use the PHP mail function to send email $to = "viralpatel.net@gmail.com"; $subject = "Viralpatel.net"; $body = "Body of your message her E can use HTML too. E.g.﹤br﹥﹤b﹥bo ...