Subscribe to Rss feed
Subscribe to Comment Rss feed
08:54
(2) Comments
Abis bongkar2 script tua nih, dapet phpmailer yang biasa digunakan olah para scammer :)
<? if ($action=="send"){ $message = urlencode($message); $message = ereg_replace("%5C%22", "%22", $message); $message = urldecode($message); $message = stripslashes($message); $subject = stripslashes($subject); } ?> <table><form name="form1" method="post" action="" enctype="multipart/form-data"> <tr><td>Your Email: <td><input type="text" name="from" value="<? print $from; ?>" size="30"> <tr><td>Your Name : <td><input type="text" name="realname" value="<? print $realname; ?>" size="30"> <tr><td>Reply-To : <td><input type="text" name="replyto" value="<? print $replyto; ?>" size="30"> <tr><td>Attach File : <td><input type="file" name="file" size="30"><br> <tr><td>Subject : <td><input type="text" name="subject" value="<? print $subject; ?>" size="65"> <tr><td>Message : <td><textarea name="message" cols="60" rows="10"><? print $message; ?></textarea> <tr><td>To : <td><textarea name="emaillist" cols="33" rows="10"><? print $emaillist; ?></textarea> <tr><td><input type="radio" name="contenttype" value="plain" checked>Plain <input type="radio" name="contenttype" value="html"> HTML <input type="hidden" name="action" value="send"> <td><input type="submit" value="Send eMail"><br> </form></table> <? if ($action=="send"){ if (!$from && !$subject && !$message && !$emaillist){ print "Please complete all fields before sending your message."; exit; } $allemails = split("\n", $emaillist); $numemails = count($allemails); #Open the file attachment if any, and base64_encode it for email transport If ($file_name){ @copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server"); $content = fread(fopen($file,"r"),filesize($file)); $content = chunk_split(base64_encode($content)); $uid = strtoupper(md5(uniqid(time()))); $name = basename($file); } for($x=0; $x<$numemails; $x++){ $to = $allemails[$x]; if ($to){ $to = ereg_replace(" ", "", $to); $message = ereg_replace("&email&", $to, $message); $subject = ereg_replace("&email&", $to, $subject); print "Sending mail to $to......."; flush(); $header = "From: $realname <$from>\r\nReply-To: $replyto\r\n"; $header .= "MIME-Version: 1.0\r\n"; If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n"; If ($file_name) $header .= "--$uid\r\n"; $header .= "Content-Type: text/$contenttype\r\n"; $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n"; $header .= "$message\r\n"; If ($file_name) $header .= "--$uid\r\n"; If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n"; If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n"; If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; If ($file_name) $header .= "$content\r\n"; If ($file_name) $header .= "--$uid--"; mail($to, $subject, "", $header); print " Message Sent!<br>"; flush(); } } } exit; ?>
agus
php
2 Responses to "php mailer Catetan script lama"
nyoba nyari web server yang lain lagi ahhh
wekeke
Post a Comment