![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Wielu z Was zapewne zna ten skrypt...
[php:1:de43dec0e5] <? # Version 1.1 Debugged, please upgrade older ones... ######################################################################## # Global Settings... ######################################################################## # Set the password for the eMail List editor! $pass="lalka"; # Name of the datafile $filelocation="subscribers.txt"; # Title of the newsletter, will be displayed in the FROM field of the mailclient $lettername="flapjack@bimber.pl"; # Your email, will be the reply-to mail $youremail="flapjack@bimber.pl"; ######################################################################## # Displayed Messages ######################################################################## # Welcome message displayed above the form for subscribing/unsubscribing $welcomemessage = "This is the place to subscribe and unsubscribe for the Onlinetools.org Newsletter. I will be sending this letter out every time there are some new tools or changes to the page. Your data will not be given to anyone and I send out small text mails only."; # Sorrymessage for failed subscription, will be followed by the email! $sorrysignmessage = "Sorry, there is already an entry for "; # Subscribe message, will be displayed when subscribing $subscribemessage = "Thank you for subscribing to the newsletter, a confirmation email is on its way!"; # Subscribemail, will be sent when someone subscribes. $subscribemail = "Thank you for subscribing to the newsletter."; # Unsubscribemessage for deletion, will be followed by the email! $unsubscribemessage = "We deleted the following entry: "; # Unsubscribemessage for failed deletion, will be followed by the email! $failedunsubscriptionmessage = "Sorry, you cannot unssubscribe as we didn't find an entry for "; ######################################################################## # Let the code begin... ######################################################################## # Checks if the file exists, if not creates a new one if (!file_exists($filelocation)) { $newfile = fopen($filelocation,"w+"); fclose($newfile); } # Open the datafile and read the content $newfile = fopen($filelocation,"r"); $content = fread($newfile, filesize($filelocation)); fclose($newfile); # Remove the slashes php automatically puts before special characters $content=stripslashes($content); # Reset the output of the "search result" $out=""; # Put the entries into the array lines $lines = explode("%",$content); for ($key=1;$key<sizeof($lines);$key++){ # when the email is not in the list, add the old entries if ($lines[$key] != $email){ $out .= "%".$lines[$key]; } # when it's already in the list, set found else { $found=1; } } ######################################################################## # Signing in ######################################################################## if ($action=="sign"){ # When there is already a subscription for this email *duh* if ($found==1){ # Display Sorrymessage echo "<div align="center"><b>".$sorrysignmessage.$email."</b></div><br><br>"; $disp="yes"; } # otherwise, add the email to the list else { $disp="no"; $newfile = fopen($filelocation,"a+"); $add = "%".$email; fwrite($newfile, $add); fclose($newfile); # display the message of subscription echo "<div align="center"><b>".$subscribemessage.$email."</b></div><br><br>"; # send confirmation Mail $submailheaders = "From: $lettername subscription formn"; $submailheaders .= "Reply-To: $youremailn"; mail ($email,$lettername." subscription",$subscribemail,$submailheaders); } } ######################################################################## # Signing out ######################################################################## if ($action=="delete"){ $disp="no"; # If the email is in the list... if ($found == 1){ $newfile = fopen($filelocation,"w+"); fwrite($newfile, $out); fclose($newfile); # display the message for deleted items... echo "<div align="center"><b>".$unsubscribemessage.$email."</b></div><br><br>"; $disp="no"; } # if the email is not in the list if ($found != 1){ # display the message that tells that... echo "<div align="center"><b>".$failedunsubscriptionmessage.$email."</b></div><br><br>"; $disp="YES"; } } ######################################################################## # The core for the owner of the letter ######################################################################## if ($pw == $pass){ # When nothing was entered so far, display the form if ($send != "yes" && $send != "test"){ print'<form method="post"><input type="hidden" name=pw value='.$pass.'><input type="hidden" name=send value=yes> <br><b>Newsletter editor:</b><br><br> Subject:<br> <input type="text" name="subject" size=20><br> Message:<br> <textarea cols=50 rows=10 wrap="virtual" name="message"></textarea><br><br> <input type="submit" value="send"> </form>'; } # Predefine the Mail Settings for sending... $mailheaders = "From: $letternamen"; $mailheaders .= "Reply-To:$youremailn"; # add data in bcc fields # Data was ok, send button is pressed if ($send == "yes"){ $message=stripslashes($message); $subject=stripslashes($subject); $lines = explode("%",$content); for ($key=1;$key<sizeof($lines);$key++){ mail ($lines[$key],$subject,$message,$mailheaders); } print "<b>The following email has been sent!</b>"; print "<pre>$mailheadersn$subjectn$message</pre>"; } } ######################################################################## # The Form for the users... ######################################################################## if ($pw != $pass && $disp != "no"){ print $welcomemessage; print' <div align="center"><form method="post"> <input type="text" name="email" value="foo@bar.com" size=30> <input type="radio" name="action" value="sign" checked>subscribe <input type="radio" name="action" value="delete">unsubscribe<br> <input type="submit" value="send"> </form></div> '; } print "<!-- Easyletter v1.1 Newsletterscript by Chris Heilmann, get yours @ http://www.onlinetools.org/easyletter/ -->"; ?> [/php:1:de43dec0e5] Jednak gdy wysylam e-maile do ludzi, a w tersci sa polskie znaki "ąśćń" to zamiast tych "ąśćń" oni dostaja potocznie nazywane "krzaczki". Czy da sie to zmienic? -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 80 Pomógł: 0 Dołączył: -- Ostrzeżenie: (0%) ![]() ![]() |
Znajdz te linijki:
[php:1:c9ceab0dd6] $submailheaders = "From: $lettername subscription formn"; $submailheaders .= "Reply-To: $youremailn"; [/php:1:c9ceab0dd6] i dopisz pod nia ta: [php:1:c9ceab0dd6] $submailheaders .= "Content-Type: text/plain; charset=ISO-8859-2n"; [/php:1:c9ceab0dd6] |
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Nie dziala do konca.
Wyslalem taki list: Ą ą Ć ć Ę ę Ó ó Ś ś Ź ź Ż ż Dostalem taki list: Ľ š Ć ć Ę ę Ó ó Ż ż -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#4
|
|
![]() Grupa: Przyjaciele php.pl Postów: 786 Pomógł: 0 Dołączył: 18.03.2002 Skąd: Wroclaw/Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Cytat Nie dziala do konca.
musisz dodac przekodowanie znakow windowsowych na iso (z win-1250 na iso-8859-2)
Wyslalem taki list: Ą ą Ć ć Ę ę Ó ó Ś ś Ź ź Ż ż Dostalem taki list: Ľ š Ć ć Ę ę Ó ó � � � � Ż ż funkcja ktora to robi dostepna jest np pdo adresem http://php.faq.pl/klucz/win2iso zostalo tylko ja dorzucic do pliku i przed wywoalem mail przekodowac wiadmosc. np:[php:1:635ca1b5a9]$message = win2iso($message);[/php:1:635ca1b5a9] pozdrawiam -------------------- .. make web your home ..
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Nie dziala... zadne z Waszych podpowiedzi. Najbardziej dziwie sie czemu nie dziala
[php:1:02a7dd8fb7] $mailheaders .= "Content-Type: text/plain; charset=iso-8859-2n"; [/php:1:02a7dd8fb7] Dzieki temu powinno byc dobrze.... chyba ze to wszystko w nie tych linijkach kodu co trzeba umieszczam... Ktos ma jakies rozwiazanie? Moze ktos ma juz taki skrypt, i mu dziala bezproblemowo... -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarejestrowani Postów: 2 064 Pomógł: 1 Dołączył: 22.01.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Cytat Nie dziala... zadne z Waszych podpowiedzi. Najbardziej dziwie sie czemu nie dziala(...)
Zwróć uwagę, że w przykładzie Wojtka były jeszcze literki "sub". -------------------- |
|
|
![]()
Post
#7
|
|
![]() Grupa: Przyjaciele php.pl Postów: 786 Pomógł: 0 Dołączył: 18.03.2002 Skąd: Wroclaw/Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Cytat Nie dziala... zadne z Waszych podpowiedzi. Najbardziej dziwie sie czemu nie dziala ide sie zalozyc ze pomoze tylko trzeba spokojnie siasc i raz jeszcze rpzeczytac czego dotycza informacje.
pozdrawiam -------------------- .. make web your home ..
|
|
|
![]()
Post
#8
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Cytat Cytat Nie dziala... zadne z Waszych podpowiedzi. Najbardziej dziwie sie czemu nie dziala(...)
Zwróć uwagę, że w przykładzie Wojtka były jeszcze literki "sub". Ten kod z sub byl do wysylania potwierdzenia dopisania sie do listy subskrybentow... $emailheaders dotyczylo wysylania widomosci do wszystkich uzytkownikow... ja nie moge, siedze przy tym z godzine dziennie probujac cos naprawic i nic... wylanczam gg, wylanczam muze... w spokoju siedze probujac naprawic i nic... kombinuje, zmieniam... i dupa... Czasami moja ambicja jest wadą... -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 80 Pomógł: 0 Dołączył: -- Ostrzeżenie: (0%) ![]() ![]() |
Hm.. Jak juz wyslesz maila, sprawdz go i zobacz jego naglowki - czy znajduje sie tam ta definicja zawierajaca ISO 8859-2. Nastepnie sprawdz czy twoj czytnik poczty jest ustalony na ISO 8859-2 - moze masz ustawiony w programie na win1250?
Jak co mozesz mi poslac jednego mail'a (wojtek@igol.pl) - moze u mnie bedzie ok ;) |
|
|
![]()
Post
#10
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Dopisuje Ciebie... zobacz sam... jest deklaracja
-------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#11
|
|
Grupa: Zarejestrowani Postów: 80 Pomógł: 0 Dołączył: -- Ostrzeżenie: (0%) ![]() ![]() |
Chyba jest wszystko dobrze, bo wlasnie dostalem:
Kod Test subskrypcji:
šśćńóżź W naglowku jest tez Content-Type: text/plain; charset=iso-8859-2, wiec to chyba cos u ciebie z programem pocztowym... W kazdym badz razie u mnie dziala. |
|
|
![]()
Post
#12
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Cytat Chyba jest wszystko dobrze, bo wlasnie dostalem:
Kod Test subskrypcji:
šśćńóżź W naglowku jest tez Content-Type: text/plain; charset=iso-8859-2, wiec to chyba cos u ciebie z programem pocztowym... W kazdym badz razie u mnie dziala. Jakim odbierasz ? -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#13
|
|
Grupa: Zarejestrowani Postów: 80 Pomógł: 0 Dołączył: -- Ostrzeżenie: (0%) ![]() ![]() |
The Bat 1.62q ;)
|
|
|
![]()
Post
#14
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Ja Outlookiem... moze cos trzba zmienic... ale gowno...
-------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#15
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Hm... działało. Znowu nie dziala... Ktos z forum cos mi podpowiedzial - i dzialalo, ale ja cos nagrzebalem i juz nie dziala. Chodzi o polskie znaki.
Te linijki kodu sprawiaja ze nie ma polskich znakow: [php:1:f90963e1fb] $submailheaders = "From: $lettername subscription formn"; $submailheaders .= "Reply-To: $youremailn"; $submailheaders .= "Content-Type: text/plain; charset=windows-1250n"; mail ($email,$lettername." subscription",$subscribemail,$submailheaders); [/php:1:f90963e1fb] [php:1:f90963e1fb] $submailheaders = "From: $lettername subscription formn"; $submailheaders .= "Reply-To: $youremailn"; $submailheaders .= "Content-Type: text/plain; charset=iso-8859-2n"; mail ($email,$lettername." subscription",$subscribemail,$submailheaders); [/php:1:f90963e1fb] Roznia sie od siebie sposobem kodowania znakow. Ani jeden, ani drugi sposob nie daje polskich znakow... Jest jakies rozwiazanie. -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#16
|
|
![]() Grupa: Zarejestrowani Postów: 2 064 Pomógł: 1 Dołączył: 22.01.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Tak, przekodować tekst do ISO.
-------------------- |
|
|
![]()
Post
#17
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Cytat Tak, przekodować tekst do ISO.
Do tego słuzy ten kod: [php:1:ae280cc4b7] $submailheaders .= "Content-Type: text/plain; charset=iso-8859-2n"; [/php:1:ae280cc4b7] -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]()
Post
#18
|
|
![]() Grupa: Zarejestrowani Postów: 2 064 Pomógł: 1 Dołączył: 22.01.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
Cytat Do tego słuzy ten kod:
Tak, wiem, ale sam musisz przekodować do ISO wysyłany tekst który chcesz wysłać. Podany nagłowek informuje czytnik poczty, w jakim kodowaniuu znaków ma wyświetlić otrzymany tekst. -------------------- |
|
|
![]()
Post
#19
|
|
![]() Grupa: Zarejestrowani Postów: 13 Pomógł: 0 Dołączył: 11.02.2003 Skąd: Poznań Ostrzeżenie: (0%) ![]() ![]() |
[php:1:4750120e2b]
$string = strtr($string, "xA5x8Cx8FxB9x9Cx9F", "xA1xA6xACxB1xB6xBC"); [/php:1:4750120e2b] To podziałało ![]() -------------------- JAJO GG:1315127
www.acid-drinkers.art.pl || jajo@acid-drinkers.art.pl www.flapjack.vel.pl || jajo@irc.pl |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 07:29 |