Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [w. reg.] Pobieranie content-type z maila
Seth
post
Post #1





Grupa: Przyjaciele php.pl
Postów: 2 335
Pomógł: 6
Dołączył: 7.03.2002

Ostrzeżenie: (0%)
-----


Pisze wyrazenie regularne do pobrania Content-Typea z czystego maila i natrafilem na maly problem.

Mozliwe ustawienia Content-Type to:
Kod
Content-Type: multipart/alternative; boundary="jh2x4CpaBw6eoB8"

Kod
Content-Type: multipart/alternative; boundary=jh2x4CpaBw6eoB8

Kod
Content-Type: multipart/alternative;
     boundary="jh2x4CpaBw6eoB8"

Kod
Content-Type: multipart/alternative;
     boundary=jh2x4CpaBw6eoB8

Kod
Content-Type: multipart/alternative;
boundary="jh2x4CpaBw6eoB8"

Kod
Content-Type: text/plain; charset="utf-8"

Kod
Content-Type: text/plain;
     charset="utf-8"

itd...

Narazie mam takei wyrazenie:
Kod
/^content-type: (.*);$/im

ktore pobiera mi ta pierwsza opcje (multipart/alternatice itp.)


Nie wiem jednak jak sie zabrac do drugiej czesci: boundary i charset.

Moze ma ktos na to pomysl ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
FiDO
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 717
Pomógł: 0
Dołączył: 12.06.2002
Skąd: Wolsztyn..... Studia: Zielona Góra

Ostrzeżenie: (0%)
-----


a takie cos nie wystarczy? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
  1. <?php
  2.  
  3. preg_match_all('#^(From|To|CC|BCC|Subject):(.+)n(?!t)#Umsi', file_get_contents('mail.msg'), $m);
  4.  
  5. echo &#092;"<pre>\";
  6. print_r($m);
  7. echo &#092;"</pre>\";
  8.  
  9. ?>
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.12.2025 - 09:48