# PHP Encoder: Encode and decode email with quoted-printable

 Last Updated Ratings Unique User Downloads Download Rankings 2021-11-22 (10 months ago) Not enough user ratings Total: 307 All time: 7,300 This week: 289
 Version License PHP version Categories php-encoder 0.1.1 GNU General Publi... 5.3 Email, PHP 5, Text processing
Description Author

This class can encode and decode email with quoted-printable.

It can take email message parts and encode them using either quoted-printable, base64, 8bit, 7bit and binary encodings.

The class can also do the opposite, i.e. decode previously encoded data with the same encodings.

 Performance Level
Name: Classes: Nathan Bishop  2 packages by Nathan Bishop Australia 31 3077 36 in Australia 164 3 in Australia

Details

# Encoder

Encoder is a class that allows encoding/decoding from/to: - Base64 - Quoted Printable - 7bit (Future Feature) - 8bit (Future Feature) - Binary

## <a name="getting-started"></a>Getting Started

1. PHP 5.3.x is required
2. Install manually

## <a name="usage"></a>Usage

Include and instantiate:

require 'path\to\Encoder.php';

$encoder = new Encoder;  Convert text to base64: $encoder->encode('HÃ«llo World!', $encoder::BASE_64); // returns 'SOtsbG8gV29ybGQh'  Convert text to quoted-printable: $encoder->encode('HÃ«llo World!', $encoder::QUOTED_PRINTABLE); // returns 'H=EBllo World!'  Decode quoted-printable text: $encoder->decode('=E1=E9=ED=F3=FA', $encoder::QUOTED_PRINTABLE); // returns 'Ã¡Ã©Ã­Ã³Ãº'  ## <a name="api"></a>API Below is a list of the public methods available for use. $encoder->
encode($input,$scheme, $length = 75) // Encode text to encoding scheme. decode($input, \$scheme)                 // Decode text from encoded text.


## <a name="testing"></a>Testing

This project keeps all tests stored in the /tests folder and uses the PHPUnit testing framework.

## <a name="contributors"></a>Contributors

(GNU General Public License, version 2)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see GNU General Public License, version 2.

 Files
File Role Description
src (1 file)
tests (1 file)

 Files / src
File Role Description
Encoder.php Class Class source

 Files / tests
File Role Description
EncoderTest.php Test Unit test script

For more information send a message to info at phpclasses dot org.