forked from halo-battle/game
Version 1.12
This commit is contained in:
parent
2a066a7498
commit
de31cd3e9a
1373 changed files with 156282 additions and 45238 deletions
30
htdocs/testmail.php
Normal file
30
htdocs/testmail.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
include('../onyx2/include/game/Class/class.pop3.php');
|
||||
|
||||
$box = new pop3_class();
|
||||
$box->hostname = "halo-battle.fr";
|
||||
print $box->Open();
|
||||
print $box->Login("admin@halo-battle.fr", "Um35!Mzv6%");
|
||||
foreach($box->ListMessages(null, null) as $key => $messages)
|
||||
{
|
||||
$out = array();
|
||||
$contenu = array();
|
||||
$box->RetrieveMessage($key, $out, $contenu, -1);
|
||||
|
||||
$headers = array();
|
||||
foreach($out as $header)
|
||||
{
|
||||
preg_match("#^([a-zA-Z0-9-]+): (.+)#ui", $header, $header);
|
||||
$headers[$header[1]] = $header[2];
|
||||
}
|
||||
|
||||
//Gestion des problèmes d'encodage
|
||||
if (ereg('charset="UTF-8"', $headers['Content-Type']))
|
||||
{
|
||||
$contenu = array_map('utf8_decode', $contenu);
|
||||
$headers = array_map('utf8_decode', $headers);
|
||||
}
|
||||
|
||||
var_dump($headers, $contenu);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue