<?php ### Dateien Includieren --------------------------------------------------------------------------- include("../config/config.php"); include("../log/cache_visitors.php"); ### Variablen für die Mail ------------------------------------------------------------------------ ### Empfnänger Mail $receiver = " xxx "; ### Empfänger Name $receiver_name = " xxx "; ### für HTML E-Mails Header setzten --------------------------------------------------------------- $header = "MIME-Version: 1.0" . "\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; $header .= "Content-Transfer-Encoding: 8bit" . "\r\n"; $header .= "X-Priority: 1" . "\r\n"; ### zusätzliche Header ---------------------------------------------------------------------------- $header .= "To: xxx " . "\r\n"; $header .= "Reply-To: xxx " . "\r\n"; $header .= "From: xxx " . "\r\n"; $header .= "Bcc: xxx " . "\r\n"; ### Betreff der EMail setzen ---------------------------------------------------------------------- $reference = "Besucherstatistik vom " . date('m.Y'); ### Besucher laden -------------------------------------------------------------------------------- $mail_visitors = $stat_add_visitors + array_sum($visitor_year); $mail_visitors_month = $visitor_month[ date( 'Y/m' ) ]; $mail_visitors_year = $visitor_year[" ". date( 'Y' ) ." "]; ### Newsletter Content zusammenstellen ------------------------------------------------------------ $news_content = " <html> <head title='WebStat - Ihre Besucherstatistik'> <style type='text/css'> body { background-color:#f6f6f6; margin:0px 0px 0px 0px; } td { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000 } hr { color:#000000; height:1px } .content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; color:#000000 } .send_content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:left; color:#585858 } .footer { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:justify; color:#585858 } .content_date { font-size:10px; text-align:right; } .content_link:link { font-size:12px; color:#000000; text-decoration:none } .content_link:visited { font-size:12px; color:#000000; text-decoration:none } .content_link:hover { font-size:12px; color:#8e0505; text-decoration:underline } </style> </head> <body> <div align='left'> <table width='600' border='0' cellpadding='5' cellspacing='3'> <tr> <td align='left' colspan='3' width='600'><img src='". $script_domain ."/". $script_path ."images/system.png' border='0' width='104' height='50' alt='WebStat' title='WebStat' /></td> </tr> <tr> <td class='content' colspan='3' width='600'> <strong>IHRE BESUCHERSTATISTIK - ". $stat_name ."</strong> <hr /> <i class='send_content'>gesendet am: ". date('d.m.Y') ." - ". date('H:i') ." Uhr</i><br /><br /> folgend erhalten Sie eine Kurzübersicht über die Besucherzahlen Ihrer Internetpräsenz.<br /> Eine ausführliche Statistik erhalten Sie im Internet unter:<br /><br /> <strong>Statistik:</strong> <a class='content_link' href='". $script_domain ."/". $script_path ."' target='_blank'>". $script_domain ."/". $script_path ."</a> <br /><br /> <strong>Passwort:</strong> ". $clientpassword ." <br /><br /> <hr /></td> </tr> <tr> <td class='content' colspan='3' width='600'>Ihre Statistik wird seit dem <strong>". $starting_date ."</strong> aufgezeichnet.</td> </tr> <tr> <td align='left' width='200'><strong>Besucher Gesamt:</strong></td> <td align='left' width='100'>". $mail_visitors ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher diesen Monat:</strong></td> <td align='left' width='100'>". $mail_visitors_month ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher im Jahr ". date('Y') .":</strong></td> <td align='left' width='100'>". $mail_visitors_year ."</td> <td width='300'> </td> </tr> <tr> <td class='footer' colspan='3' width='600'><br /><br /><br />Diese Email wurde durch einen Cronjob automatisch generiert, bitte antworten Sie nicht auf die Absenderadresse dieser Email.</td> </tr> </table> </div> </body> </html>"; ### verschicken der E-Mail -------------------------------------------------------------------- mail($receiver, $reference, $news_content, $header); ?>
<?php ### Dateien Includieren --------------------------------------------------------------------------- include("../config/config.php"); include("../log/cache_visitors.php"); ### Variablen für die Mail ------------------------------------------------------------------------ ### Empfnänger Mail $receiver = " empfaenger@mail.de "; ### Empfänger Name $receiver_name = " Max Mustermann "; ### für HTML E-Mails Header setzten --------------------------------------------------------------- $header = "MIME-Version: 1.0" . "\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; $header .= "Content-Transfer-Encoding: 8bit" . "\r\n"; $header .= "X-Priority: 1" . "\r\n"; ### zusätzliche Header ---------------------------------------------------------------------------- $header .= "To: xxx " . "\r\n"; $header .= "Reply-To: xxx " . "\r\n"; $header .= "From: xxx " . "\r\n"; $header .= "Bcc: xxx " . "\r\n"; ### Betreff der EMail setzen ---------------------------------------------------------------------- $reference = "Besucherstatistik vom " . date('m.Y'); ### Besucher laden -------------------------------------------------------------------------------- $mail_visitors = $stat_add_visitors + array_sum($visitor_year); $mail_visitors_month = $visitor_month[ date( 'Y/m' ) ]; $mail_visitors_year = $visitor_year[" ". date( 'Y' ) ." "]; ### Newsletter Content zusammenstellen ------------------------------------------------------------ $news_content = " <html> <head title='WebStat - Ihre Besucherstatistik'> <style type='text/css'> body { background-color:#f6f6f6; margin:0px 0px 0px 0px; } td { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000 } hr { color:#000000; height:1px } .content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; color:#000000 } .send_content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:left; color:#585858 } .footer { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:justify; color:#585858 } .content_date { font-size:10px; text-align:right; } .content_link:link { font-size:12px; color:#000000; text-decoration:none } .content_link:visited { font-size:12px; color:#000000; text-decoration:none } .content_link:hover { font-size:12px; color:#8e0505; text-decoration:underline } </style> </head> <body> <div align='left'> <table width='600' border='0' cellpadding='5' cellspacing='3'> <tr> <td align='left' colspan='3' width='600'><img src='". $script_domain ."/". $script_path ."images/system.png' border='0' width='104' height='50' alt='WebStat' title='WebStat' /></td> </tr> <tr> <td class='content' colspan='3' width='600'> <strong>IHRE BESUCHERSTATISTIK - ". $stat_name ."</strong> <hr /> <i class='send_content'>gesendet am: ". date('d.m.Y') ." - ". date('H:i') ." Uhr</i><br /><br /> folgend erhalten Sie eine Kurzübersicht über die Besucherzahlen Ihrer Internetpräsenz.<br /> Eine ausführliche Statistik erhalten Sie im Internet unter:<br /><br /> <strong>Statistik:</strong> <a class='content_link' href='". $script_domain ."/". $script_path ."' target='_blank'>". $script_domain ."/". $script_path ."</a> <br /><br /> <strong>Passwort:</strong> ". $clientpassword ." <br /><br /> <hr /></td> </tr> <tr> <td class='content' colspan='3' width='600'>Ihre Statistik wird seit dem <strong>". $starting_date ."</strong> aufgezeichnet.</td> </tr> <tr> <td align='left' width='200'><strong>Besucher Gesamt:</strong></td> <td align='left' width='100'>". $mail_visitors ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher diesen Monat:</strong></td> <td align='left' width='100'>". $mail_visitors_month ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher im Jahr ". date('Y') .":</strong></td> <td align='left' width='100'>". $mail_visitors_year ."</td> <td width='300'> </td> </tr> <tr> <td class='footer' colspan='3' width='600'><br /><br /><br />Diese Email wurde durch einen Cronjob automatisch generiert, bitte antworten Sie nicht auf die Absenderadresse dieser Email.</td> </tr> </table> </div> </body> </html>"; ### verschicken der E-Mail -------------------------------------------------------------------- mail($receiver, $reference, $news_content, $header);?>
### Besucher laden -------------------------------------------------------------------------------- $mail_visitors = $stat_add_visitors + array_sum($visitor_year); $mail_visitors_month = $visitor_month[ date( 'Y/m' ) ]; $mail_visitors_year = $visitor_year[" ". date( 'Y' ) ." "]; $mail_searchwords_archive = $searchwords_archive;
$mail_searchwords_archive = $searchwords_archive;
<html> <head> <title>Statistik E-Mail Versand</title> </head> <body> <?php if (isset($_POST['senden'])) { if (!empty($_POST['name']) or !empty($_POST['mail'])) { ### Dateien Includieren --------------------------------------------------------------------------- include("../config/config.php"); include("../log/cache_visitors.php"); ### Einstellungen einstellen // An welche E-Mail Adresse soll der Benutzer antworten? // Beispiel: webmaster@example.com $reply_to = "webmaster@example.com"; // Absender? (E-Mail Adresse) // Beispiel: noreply@example.com $from = $reply_to; // Priority // 0 = Normal // 1 = Hoch // 3 = Sehr Hoch $priority = "0"; // Startdatum der Statistik // Format beibehalten! // => TT.MM.YYYY // => Beispiel: 11.07.2010 $start_date = ""; ### Variablen für die Mail ------------------------------------------------------------------------ ### Empfänger Mail $receiver = $_POST['mail']; ### Empfänger Name if (empty($_POST['mail'])){ $receiver_name = "Gast"; }else{ $receiver_name = $_POST['name']; } ### für HTML E-Mails Header setzten --------------------------------------------------------------- $header = "MIME-Version: 1.0" . "\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; $header .= "Content-Transfer-Encoding: 8bit" . "\r\n"; $header .= "X-Priority: ".$priority."" . "\r\n"; ### Header einstellen $to = $_POST['mail']; ### zusätzliche Header ---------------------------------------------------------------------------- $header .= "To: ".$to." " ."\r\n"; $header .= "Reply-To: ".$reply_to." " ."\r\n"; $header .= "From: ".$from." " ."\r\n"; $header .= "Bcc: ".$to." " ."\r\n"; ### Betreff der E-Mail setzen ---------------------------------------------------------------------- $reference = "Besucherstatistik vom ".date('m.Y'); ### Besucher laden -------------------------------------------------------------------------------- $mail_visitors = $stat_add_visitors + array_sum($visitor_year); $mail_visitors_month = $visitor_month[ date( 'Y/m' ) ]; $mail_visitors_year = $visitor_year[" ". date( 'Y' ) ." "]; ### Verarbeitung ------------------------------------------------------------------------------- if ($starting_date == "TT.MM.YYYY" And $start_date == "") { die('Bitte fuelle $start_date aus!'); }else{ $date = $start_date; } ### Newsletter Content zusammenstellen ------------------------------------------------------------ $news_content = "<html> <head title='Besucherstatistik von ".$stat_name."'> <style type='text/css'> body { background-color:#f6f6f6; margin:0px 0px 0px 0px; } td { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000 } hr { color:#000000; height:1px } .content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; color:#000000 } .send_content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:left; color:#585858 } .footer { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:justify; color:#585858 } .content_date { font-size:10px; text-align:right; } .content_link:link { font-size:12px; color:#000000; text-decoration:none } .content_link:visited { font-size:12px; color:#000000; text-decoration:none } .content_link:hover { font-size:12px; color:#8e0505; text-decoration:underline } </style> </head> <body> <div align='left'> <table width='600' border='0' cellpadding='5' cellspacing='3'> <tr> <td align='left' colspan='3' width='600'><img src='".$script_domain."/".$script_path."images/system.png' border='0' width='104' height='50' alt='Web-Statistik' title='Web-Statistik' /></td> </tr> <tr> <td class='content' colspan='3' width='600'> <strong>Besucherstatistik - ".$stat_name."</strong> <hr /> <i class='send_content'>gesendet am: ".date('d.m.Y')." - ".date('H:i')." Uhr</i><br /><br /> <br /><br />Sehr geehrte/r ".$receiver_name.", <br /> Hier ist die Statistik die Sie auf ".$stat_name." angefordert haben. <br /><br /> Eine ausführliche Statistik erhalten Sie im Internet unter:<br /> <a class='content_link' href='".$script_domain."/".$script_path."' target='_blank'>".$script_domain."/".$script_path."</a> <br /><br /> <strong>Passwort:</strong> ".$clientpassword." <br /><br /><br /> <hr /></td> </tr> <tr> <td class='content' colspan='3' width='600'>Die Statistik wird seit dem <strong>".$date."</strong> aufgezeichnet.</td> </tr> <tr> <td align='left' width='200'><strong>Besucher Gesamt:</strong></td> <td align='left' width='100'>".$mail_visitors."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher diesen Monat:</strong></td> <td align='left' width='100'>".$mail_visitors_month."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher im Jahr ". date('Y') .":</strong></td> <td align='left' width='100'>".$mail_visitors_year."</td> <td width='300'> </td> </tr> <tr> <td class='footer' colspan='3' width='600'><br /><br /><br />Diese Email wurde automatisch generiert, bitte antworten Sie nicht auf die E-Mail.</td> </tr> </table> </div> </body> </html>"; ### E-Mail versenden... ------------------------------------------------------------------------ mail($receiver, $reference, $news_content, $header); ### E-Mail versandt... ----------------------------------------------------------------------- echo "E-Mail versendet."; }else{ echo 'Fülle alle Felder korrekt aus!'; } }else{ ?> <form action="" method="post"> <b>Vorname</b><br> <input name="name" type="text"><br> <b>E-Mail</b><br> <input name="mail" type="text"><br> <input name="senden" type="submit" value="Daten absenden"> </form> <?php } ?> </body> </html>
<?php ### Dateien Includieren --------------------------------------------------------------------------- include("../config/config.php"); include("../log/cache_visitors.php"); ### Variablen für die Mail ------------------------------------------------------------------------ ### Sender Mail $from_address = "xxx@example.com"; ### Sender Name $from_name = "Webstat"; ### Empfnänger Mail $receiver = "xxx@example.com"; ### Empfänger Name $receiver_name = "XXX"; ### für HTML E-Mails Header setzten --------------------------------------------------------------- $header = "MIME-Version: 1.0" . "\r\n"; $header .= "Content-type: text/html; charset=iso-8859-1" . "\r\n"; $header .= "Content-Transfer-Encoding: 8bit" . "\r\n"; $header .= "X-Priority: 1" . "\r\n"; ### zusätzliche Header ---------------------------------------------------------------------------- $header .= 'From: ' . $from_name . ' <' . $from_address . '>' . "\r\n"; $header .= 'Reply-To: ' . $from_address . "\r\n"; $header .= 'Return-Path: ' . $from_address . "\r\n"; $header .= "Message-ID: <".md5(uniqid(time().rand(1,1000)))."@".$_SERVER['SERVER_NAME'].">". "\r\n"; $optionalparams = '-r'.$from_address; ### Betreff der EMail setzen ---------------------------------------------------------------------- $reference = "Besucherstatistik vom " . date('m.Y'); ### Besucher laden -------------------------------------------------------------------------------- $mail_visitors = $stat_add_visitors + array_sum($visitor_year); $mail_visitors_month = $visitor_month[ date( 'Y/m' ) ]; $mail_visitors_year = $visitor_year[" ". date( 'Y' ) ." "]; $mail_searchwords_archive = $searchwords_archive; ### Newsletter Content zusammenstellen ------------------------------------------------------------ $news_content = " <html> <head title='WebStat - Ihre Besucherstatistik'> <style type='text/css'> body { background-color:#f6f6f6; margin:0px 0px 0px 0px; } td { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000 } hr { color:#000000; height:1px } .content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; color:#000000 } .send_content { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:left; color:#585858 } .footer { font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; text-align:justify; color:#585858 } .content_date { font-size:10px; text-align:right; } .content_link:link { font-size:12px; color:#000000; text-decoration:none } .content_link:visited { font-size:12px; color:#000000; text-decoration:none } .content_link:hover { font-size:12px; color:#8e0505; text-decoration:underline } </style> </head> <body> <div align='left'> <table width='600' border='0' cellpadding='5' cellspacing='3'> <tr> <td align='left' colspan='3' width='600'><img src='". $script_domain ."/". $script_path ."images/system.png' border='0' width='104' height='50' alt='WebStat' title='WebStat' /></td> </tr> <tr> <td class='content' colspan='3' width='600'> <strong>IHRE BESUCHERSTATISTIK - ". $stat_name ."</strong> <hr /> <i class='send_content'>gesendet am: ". date('d.m.Y') ." - ". date('H:i') ." Uhr</i><br /><br /> folgend erhalten Sie eine Kurzübersicht über die Besucherzahlen Ihrer Internetpräsenz.<br /> Eine ausführliche Statistik erhalten Sie im Internet unter:<br /><br /> <strong>Statistik:</strong> <a class='content_link' href='". $script_domain ."/". $script_path ."' target='_blank'>". $script_domain ."/". $script_path ."</a> <br /><br /> <strong>Passwort:</strong> ". $clientpassword ." <br /><br /> <hr /></td> </tr> <tr> <td class='content' colspan='3' width='600'>Ihre Statistik wird seit dem <strong>". $starting_date ."</strong> aufgezeichnet.</td> </tr> <tr> <td align='left' width='200'><strong>Besucher Gesamt:</strong></td> <td align='left' width='100'>". $mail_visitors ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher diesen Monat:</strong></td> <td align='left' width='100'>". $mail_visitors_month ."</td> <td width='300'> </td> </tr> <tr> <td align='left' width='200'><strong>Besucher im Jahr ". date('Y') .":</strong></td> <td align='left' width='100'>". $mail_visitors_year ."</td> <td width='300'> </td> </tr> <tr> <td class='footer' colspan='3' width='600'><br /><br /><br />Diese Email wurde durch einen Cronjob automatisch generiert, bitte antworten Sie nicht auf die Absenderadresse dieser Email.</td> </tr> </table> </div> </body> </html>"; ### verschicken der E-Mail -------------------------------------------------------------------- mail($receiver, $reference, $news_content, $header, $optionalparams ); ?>
PHP Notice: Undefined index: SERVER_NAME in /var/www/stat/mail/mail.php on line 28
PHP Notice: Undefined variable: searchwords_archive in /var/www/stat/mail/mail.php on line 40
Ihre Statistik wird seit dem TT.MM.YYYY aufgezeichnet.
$header .= 'Message-ID: <'.md5(uniqid(time().rand(1,1000))).'@'.$_SERVER [ "SERVER_NAME" ].'>' . "\r\n";