PHP Classes

PHP Encoder: Encode and decode email with quoted-printable

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (8 months ago) RSS 2.0 feedStarStarStar 52%Total: 317 All time: 7,251 This week: 455Up
Version License PHP version Categories
php-encoder 0.1.9GNU General Publi...5.3Email, 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.

Picture of Nathan Bishop
  Performance   Level  
Name: Nathan Bishop <contact>
Classes: 2 packages by
Country: Australia Australia
Age: 33
All time rank: 307038 in Australia Australia
Week rank: 170 Up3 in Australia Australia Up

Details

Encoder

Build Status

Table of Contents

<a name="about"></a>About

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

<a name="license"></a>License

(GNU General Public License, version 2)

Copyright &copy; 2013, Nathan Bishop

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 folder image Files (3)  
File Role Description
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (3)  /  src  
File Role Description
  Plain text file Encoder.php Class Class source

  Files folder image Files (3)  /  tests  
File Role Description
  Accessible without login Plain text file EncoderTest.php Test Unit test script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:317
This week:0
All time:7,251
This week:455Up
User Ratings User Comments (1)
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:2397
 
Thats a good class ;-)
10 years ago (José Filipe Lopes Santos)
70%StarStarStarStar