Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Richard Heyes  >  Mime Decode  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: An example script
Class: Mime Decode
Author: By
Last change:
Date: 2001-10-01 14:26
Size: 902 bytes
 

Contents

Class file image Download
<?php
/***************************************
** Filename.......: example.php
** Project........: Mime Decoder
** Last Modified..: 26 September 2001
***************************************/

/***************************************
** This script shows how to use the mime
** decoding class. All it does is take
** the input, decode it, and show it on
** screen.
***************************************/

    
include('./mimeDecode.php');

    
$filename './example.email.txt';
    
$message  fread(fopen($filename'r'), filesize($filename));

    
header('Content-Type: text/plain');
    
header('Content-Disposition: inline; filename="stuff.txt"');

    
$params = array(
                    
'input'          => $message,
                    
'crlf'           => "\r\n",
                    
'include_bodies' => TRUE,
                    
'decode_headers' => TRUE,
                    
'decode_bodies'  => TRUE
                    
);

    
print_r(Mail_mimeDecode::decode($params));
?>