JorgenPhi/php-snapchat — pull request #25 by hisham-albeik (2014-06-14 02:44:44+00:00)
Title: Identify compression

When a snapchat video is sent with "text" or overlay the overlay is a transparent PNG file Zipped together with the M4V file. First two bytes are "PK" x50x4B; thus the previous media checks will fail and the method would've returned FALSE on an available media.

The changes here would check for compression header (PK), and then would attempt to extract the files from the blob.

The files are written to an array consisting of filenames as keys, and their respective data blob as the value.

Tested on my environment by sending myself a snapchat video with overlay.

My script utilizing php-snapchat was able to successfully extract the files and write them to my local disk.

Future enhancement consideration: Append the filename with the equivalent extension. PNG/M4V.