mailparse_determine_best_xfer_encoding
(PECL mailparse >= 0.9.0)
mailparse_determine_best_xfer_encoding — Gets the best way of encoding
Description
string mailparse_determine_best_xfer_encoding
( resource
$fp
)Figures out the best way of encoding the content read from the given file pointer.
Parameters
-
fp
-
A valid file pointer, which must be seek-able.
Return Values
Returns one of the character encodings supported by the mbstring module.
Examples
Example #1 mailparse_determine_best_xfer_encoding() example
<?php
$fp = fopen('somemail.eml', 'r');
echo 'Best encoding: ' . mailparse_determine_best_xfer_encoding($fp);
?>
The above example will output something similar to:
Best encoding: 7bit
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с почтой
- Mailparse
- mailparse_determine_best_xfer_encoding
- mailparse_msg_create
- mailparse_msg_extract_part_file
- mailparse_msg_extract_part
- mailparse_msg_extract_whole_part_file
- mailparse_msg_free
- mailparse_msg_get_part_data
- mailparse_msg_get_part
- mailparse_msg_get_structure
- mailparse_msg_parse_file
- mailparse_msg_parse
- mailparse_rfc822_parse_addresses
- mailparse_stream_encode
- mailparse_uudecode_all
Коментарии
As far as I can tell, this only returns one of two strings: 'Quoted-Printable' or '7bit'
As of mailparse-2.1.5, it can return 7bit, 8bit, base64 and qprint. False on mbstring failure.
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="ver.php" method="GET">
<p>Introduzca un Usuario:</p>
<input type="text" name="usu"><br>
<p>Introduzca un Contrasinal:</p>
<input type="password" name="con"><br>
<input type="submit" name="Enviar">
</form>
</body>
</html>
<?php
session_start();
?>
<?php
$conexion=mysqli_connect('192.168.2.201','proba','abc123.','senderismo') or die (mysqli_error($conexion));
if ($conexion) {
$usu1=$_GET['usu'];
$con1=$_GET['con'];
}
if ((strcmp($usu1, "Eva")==0 || strcmp($usu1, "Xan")==0)&& strcmp($con1, "abc123.")==0 ){
$_SESSION['usu']=$usu1;
$_SESSION['con']=$con1;
echo "Benvido: ", $usu1;
echo "<form action='lista.php' method='GET'>
<input type='submit' name='c' value='Listado Completo'><br>
<input type='submit' name='m' value='Listado por Marca'><br>
<input type='submit' name='p' value='Listado por prezo'><br>
<select name='T'>
<option name='Calcetin'>Calcetin</option>
<option name='Pantalon'>Pantalon</option>
<option name='Bota'>Bota</option>
<option name='Chaqueta'>Chaqueta</option>
<option name='Zapatilla'>Zapatilla</option>
</select>
<input type='submit' name='e' value='Enviar'><br>
</form>";
if (strcmp($usu1, "Eva")==0{
echo "<input type='button' name='c' value='Engadir Rexistro'><br>
<input type='button' name='m' value='Editar Rexistro'><br>
<input type='button' name='p' value='Eliminar Rexistro'><br>";
}
}
else {
echo "Non se puido conectar a BBDD";
}
?>
<?php
session_start();
?>
<?php
$conexion=mysqli_connect('192.168.2.201','proba','abc123.','senderismo') or die (mysqli_error($conexion));
if ($conexion) {
if (isset($_GET['c'])) {
$datos=mysqli_query($conexion,"SELECT * FROM material");
}
if (isset($_GET['m'])) {
$datos=mysqli_query($conexion,"SELECT * FROM material ORDER BY Marca");
}
if (isset($_GET['p'])) {
$datos=mysqli_query($conexion,"SELECT * FROM material ORDER BY Prezo");
}
if (isset($_GET['e'])) {
if (isset($_GET['T']){
$type=$_GET['T']
$datos=mysqli_query($conexion,"SELECT * FROM material where Tipo like '$type$");
}
}
if ($datos != FALSE) {
while ($fila=mysqli_fetch_array($datos)) {
$srcImaxe=$fila['Imaxe'].".jpg";
echo "<div class='produto'><img src='imaxes/$srcImaxe'><br>",$fila['Nome'],"<br>",
$fila['Marca'],"<br>",$fila['Tipo'],"<br>",$fila['Prezo'],"€<br></div>";
}
}
echo "<form action='ver.php' method='GET'
<input type='submit' name='volta' value='Vovler atrás'<br>
</form>";
}
else{
echo "Mal;"
}
?>