milo
Mitglied
Hallo,
ich habe ein Flash-Gästebuch. EInträge werden mit PHP ausgewertet und als TXT-Dateien abgespeichert und dann wieder in Flash dargestellt. Allerdings fehlen sämtliche Umlaute und ß etc. Für Hilfe, was, wie und wo ich im PHP Dokument einfügen muss (oder doch in Flash?) oder wie auch immer wäre ich sehr dankbar.
Hier da PHP-Script:
<?
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message)) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Input required for all fields.");
exit;
}
$email = strtolower($email);
addentry($name, $email, $website, $message);
function addentry($name, $email, $website, $message) {
$posted = strftime("%D %I:%M %p");
$message = stripslashes($message);
$file = fopen('entry.txt', 'a+');
if (!$file) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
fputs($file, "<font color=\"#990000\">Name:</font> $name\n<font color=\"#990000\">Email:</font><font color=\"#FFFFFF\"><A href=\"mailto:$email\"> $email</A></font><br>\n<font color=\"#990000\">Website:</font><font color=\"#FFFFFF\"><A href=\"http://$website\"target=\"_blank\"> $website</A></font><br>\n<font color=\"#990000\">Posted:</font> $posted\n<font color=\"#990000\">Message:</font> $message\n\n");
fclose($file);
mailAdmin($name, $email, $website, $message);
}
function mailAdmin($name, $email, $website, $message) {
$mailTo = "ango1@gmx.de";
$mailFrom = "From: <info@shanes.de>";
$mailSubject = "New Guestbook Entry";
$mailBody = "A visitor to your site has left the following information in your guestbook:\n
Name: $name
Email: $email
Website: $website
The visitor commented:
------------------------------
$message
------------------------------
You can view the message at:
http://www.ango1@gmx.de.de";
mail($mailTo, $mailSubject, $mailBody, $mailFrom);
mail($email, "Gaestebuch http://www.shanes.de", "Vielen Dank fuer Deinen Gaestebucheintrag auf http://www.shanes.de", "From: info@shanes.de");
}
print "&result=okay";
exit;
?>
ich habe ein Flash-Gästebuch. EInträge werden mit PHP ausgewertet und als TXT-Dateien abgespeichert und dann wieder in Flash dargestellt. Allerdings fehlen sämtliche Umlaute und ß etc. Für Hilfe, was, wie und wo ich im PHP Dokument einfügen muss (oder doch in Flash?) oder wie auch immer wäre ich sehr dankbar.
Hier da PHP-Script:
<?
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message)) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Input required for all fields.");
exit;
}
$email = strtolower($email);
addentry($name, $email, $website, $message);
function addentry($name, $email, $website, $message) {
$posted = strftime("%D %I:%M %p");
$message = stripslashes($message);
$file = fopen('entry.txt', 'a+');
if (!$file) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
fputs($file, "<font color=\"#990000\">Name:</font> $name\n<font color=\"#990000\">Email:</font><font color=\"#FFFFFF\"><A href=\"mailto:$email\"> $email</A></font><br>\n<font color=\"#990000\">Website:</font><font color=\"#FFFFFF\"><A href=\"http://$website\"target=\"_blank\"> $website</A></font><br>\n<font color=\"#990000\">Posted:</font> $posted\n<font color=\"#990000\">Message:</font> $message\n\n");
fclose($file);
mailAdmin($name, $email, $website, $message);
}
function mailAdmin($name, $email, $website, $message) {
$mailTo = "ango1@gmx.de";
$mailFrom = "From: <info@shanes.de>";
$mailSubject = "New Guestbook Entry";
$mailBody = "A visitor to your site has left the following information in your guestbook:\n
Name: $name
Email: $email
Website: $website
The visitor commented:
------------------------------
$message
------------------------------
You can view the message at:
http://www.ango1@gmx.de.de";
mail($mailTo, $mailSubject, $mailBody, $mailFrom);
mail($email, "Gaestebuch http://www.shanes.de", "Vielen Dank fuer Deinen Gaestebucheintrag auf http://www.shanes.de", "From: info@shanes.de");
}
print "&result=okay";
exit;
?>