August 6th, 2013, 11:44 AM
File parts detection in html code (part1, part2...)...
I working on file search engine like filestube and I want like they do to group file parts on one page...but I need to detect it with my bot on html pages, that will be easy if exist one way to split large file in few small files but exist many ways, linux, rar etc. and almost every method adding other sign to file name like part 1, part 2...or .001, .002...I don`t know for all methods and what they add to file name...
Do you know for some php class/code that can detect and parse it?
August 6th, 2013, 12:08 PM
What suffixes do you want to look for?
August 6th, 2013, 12:15 PM
That is one of main problems because exist many ways to split files and all of them adding something to original file name for parts, few examples:
Originally Posted by requinix
- part1, part2
- 001, 002
- z01, z02
but look like exist many more and that is reason why I asking for php class...
August 6th, 2013, 01:12 PM
You can't detect all possible suffixes.
If you have a filename, strip off the extension and do a wildcard search. foo.ext -> foo.*
That can get you all files that look similar, and should work for suffixes that include periods (.part and not, say, -part or _part). If you want other suffixes then you can probably take about the same approach with wildcards.