[advanced search]
Results from the most recent live auction are here.
25 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 09-10-2006, 06:09 AM   · #1
gauravmm
NamePros Member
 
Trader Rating: (0)
Join Date: Oct 2005
Posts: 40
NP$: 64.00 (Donate)
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---

"
;
    
/**************************************************  ****/
}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."
"
.
    
"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
?>


Please register or log-in into NamePros to hide ads
gauravmm is offline   Reply With Quote
Old 09-18-2006, 07:57 PM   · #2
netzilla
Senior Member
 
netzilla's Avatar
 
Name: Josh Evans
Location: Ohio
Trader Rating: (31)
Join Date: Aug 2005
Posts: 1,651
NP$: 87.75 (Donate)
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 behold
Thanks for posting
__________________
PM me if you need php/mysql work done!

Go..Go..Netzilla
netzilla is online now   Reply With Quote
Old 11-05-2006, 02:00 PM   · #3
Mr Blockeel
NamePros Regular
 
Mr Blockeel's Avatar
 
Location: Ghent, Belgium
Trader Rating: (13)
Join Date: Oct 2006
Posts: 476
NP$: 226.70 (Donate)
Mr Blockeel will become famous soon enoughMr Blockeel will become famous soon enough
nice piece of coding
simple but clean
__________________
Mr Blockeel is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


Site Sponsors
Proof is in the Parking http://www.mobisitetrader.com/ http://www.dnfinder.com
Advertise your business at NamePros
All times are GMT -7. The time now is 12:23 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0