src/snapchat_agent.php
function isMedia($data) {
		// Check for a JPG header.
		if ($data[0] == chr(0xFF) && $data[1] == chr(0xD8)) {
			return TRUE;
		}

		// Check for a MP4 header.
		if ($data[0] == chr(0x00) && $data[1] == chr(0x00)) {
			return TRUE;
		}

		return FALSE;
	}
function isMedia($data) {
		// Check for a JPG header.
		if ($data[0] == chr(0xFF) && $data[1] == chr(0xD8)) {
			return TRUE;
		}

		// Check for a MP4 header.
		if ($data[0] == chr(0x00) && $data[1] == chr(0x00)) {
			return TRUE;
		}

		return FALSE;
	}
function isMedia ( $ data ) { // Check for a JPG header. if ( $ data [ 0 ] == chr ( 0xFF ) && $ data [ 1 ] == chr ( 0xD8 ) ) { return TRUE ; } // Check for a MP4 header. if ( $ data [ 0 ] == chr ( 0x00 ) && $ data [ 1 ] == chr ( 0x00 ) ) { return TRUE ; } return FALSE ; }
Checks to see if a blob looks like a media file.

@param data $data
The blob data (or just the header).

@return bool
TRUE if the blob looks like a media file, FALSE otherwise.
Checks to see if a blob looks like a media file .