NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Php Mail Report

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 09-10-2006, 06:09 AM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: Oct 2005
Posts: 40
gauravmm is an unknown quantity at this point
 



Php Mail Report


Here is another mail script i wrote...
This handy little script will save up all feedback until a certain size is reached. It will then send a nicely formatted email to your email.
No Refresh Sending!
Send mail without refreshing/changing page from html
Email Buffer
Helps you reduce spam!
PHP Code:
<?php
//Destination Email ID
$to "maneks@gmail.com";
//feedback file
$ffile 'feedback.txt';
//from
$from "feedbackbot@gauravmm.rafflesian.net";
//check for hacking
if(!isset($_POST['name'])){
    
/*********** Hacking Report body *******************/
    
$matter 
    
"          ---HACKING ATTEMPT---
"
.  
    
"IP        : ".$_SERVER['REMOTE_ADDR']."
"
.
    
"Time      : ".date('l dS \of F Y h:i:s A')."
"
.
    
"          ---END OF REPORT---

"
;
    
/******************************************************/
????: NamePros.com http://www.namepros.com/code/236546-php-mail-report.html
}else{
    
//Name of the Person
    
$namenew $_POST['name'];    
     
//Email Id of the person
    
$emailnew $_POST['email'];      
    
//Feedback detail
    
$feedbacknew $_POST['feedback']; 
    
/*********** Report body *******************/
    
$matter 
    
"            ---REPORT---
"
.  
    
"Name      : ".$namenew."
????: NamePros.com http://www.namepros.com/showthread.php?t=236546
"
.
    
"Email     : ".$emailnew."
"
.
    
"Suggestion: ".$feedbacknew."
"
.
    
"IP        : ".$_SERVER['REMOTE_ADDR']."
"
.
    
"Time      : ".date('l dS \of F Y h:i:s A')."
"
.
    
"          ---END OF REPORT---

"
;
/**********************************************/
}
    
$comp 
    
"            ---REPORT---
"
.  
    
"Name      : ".$namenew."
"
.
    
"Email     : ".$emailnew."
"
.
    
"Suggestion: ".$feedbacknew."
"
;
if (
stristr(file_get_contents($ffile), $comp) === False){
$fp fopen($ffile,'a');
fwrite($fp,$matter);
fclose($fp);
if(
filesize($ffile)>1000){
    
mail($to"Feedback Report",file_get_contents($ffile),"From: " $from);
    
unlink($ffile);
}
}
header("HTTP/1.0 204 No Content");//no refresh
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>
gauravmm is offline  
Old 09-18-2006, 07:57 PM   #2 (permalink)
Senior Member
 
netzilla's Avatar
Join Date: Aug 2005
Posts: 1,716
netzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to beholdnetzilla is a splendid one to behold
 



Thanks for posting
netzilla is offline  
Old 11-05-2006, 02:00 PM   #3 (permalink)
NamePros Regular
Join Date: Oct 2006
Location: Ghent, Belgium
Posts: 489
Mr Blockeel will become famous soon enoughMr Blockeel will become famous soon enough
 



nice piece of coding
simple but clean
__________________
Mr Blockeel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:58 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger