Jump to content

Search the Community

Showing results for tags 'corrupted'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello, I'm having a huge issue right now decoding a zip file from an attachment with a content-encoding of quoted-printable. I have tried a couple different methods (such as decoding the entire attachment or decoding it line by line), but none have produced a valid file when saved. What I don't understand is that I can download and open the file in Outlook fine, so there must be something wrong with the decoder. Here is a code snippet of my recent attempt: elseif ($transferEncoding == 'quoted-printable'){ $fileError = true; $attachmentParts = explode("\n", $currentPart->getContent()); $attachmentArray = array(); foreach ($attachmentParts as $line){ array_push($attachmentArray, quoted_printable_decode($line)); } $attachment = implode("", $attachmentArray); file_put_contents($unzipPath . '.zip', $attachment); } $unzipper = new Decompress(array( 'adapter' => 'Zip', 'options' => array( 'target' => $unzipPath, ) )); $unzipper->filter($unzipPath . '.zip'); unlink($unzipPath . '.zip'); I'm using Zend Framework 2 methods for unzipping the file when it's done, but there is a CRC error because the file is getting corrupted during the decode. This is how the file compares to the original (using Beyond Compare 3): So it is finding the hex for CLRF and removing it from the file. Any ideas on this would be greatly appreciated as I have been trying to solve this for about a month now. Thanks, -mcfloyd
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.