Tim Starling wrote:
I made a jar just now with no manifest file, it worked
just fine. I
suppose you'd have to bundle a complete Zip file parser, like the one in
PEAR, and then use it to search the directory for *.class files.
The hard part is working out exactly how Java works, so that you can match
its algorithm in pure PHP. It's not going to be fast or pretty.
-- Tim Starling
:(
That's the problem with so generic file formats. it's easy to treat
them, but hard to tell apart.
Note that the check for PK\x05\x06 is quite weak, all these legitimate
files on commons contain those four bytes :)
(although not on last 65558 bytes)
*BCChickadee_platform.jpg
*Carboxysome.png
*Opelbad.jpg
*Jin_Mao_Tower_and_Shanghai_World_Financial_Center.jpg
*Katzs.jpg
*AntoniaGerstackerUltraCover-1.jpg
*Berncastel_Burg_Landshut_1900.jpg
*Fountain_The_Kissing_Students_10.jpg
*Cricket_Pavilion_of_Sandbach_School.JPG
*Barrow_Alaska_(2).jpg
*Sakura_01.jpg
*Villandry5.jpg
*Montelbaan_Tower_Amsterdam.jpg
*Beverly_Hillbillies_Episode_13_Home_For_Christmas.ogg
*Sodra_lanken_vv_3.jpg
*2008-07-12_North_Carolina_Mutual_Life_across_NC_147.jpg
*JREast-Shin-misato-station-platform.jpg
*BETTA_FLASH_20080704_Japan_Expo_037.jpg
*Paulo_S├®rgio_Passos.jpg
*Tanja_200mm.jpg
*Civil_aviation_authority,_Prague_Ruzyn─ø.jpg
*IC_2000_(zehn_Wagen),_cropped,_20080330Y222a.jpg
*2008-08-01_Dead_turtle_at_Brier_Creek_Reservoir_1.jpg
*Aachen,_Pontstraße.jpg
*Schenck_Wiesbaden_099.jpg
*Monument_inside_the_Temple_of_Horus_Edfu_977.PNG
*Haworthia_papillosa_(4).jpg
*Advance-3-06.jpg
*JRW_kuchiba_sta.jpg
*Pauly-Wissowa_V,1,_0055.jpg
*SashaGreyEroticaLA08.JPG
*Petits_fours_C.jpg
*Ruth_Glacier_2.jpg
*Diana_Gurtskaya,_Georgia,_Eurovision_2008,_final_02.jpg
*Oriskany_July_2008_-48.jpg
*Bootshafen_Voelkermarkt.JPG
*Dobromierz_DolnySlask.jpg