#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    21
    Rep Power
    0

    Question File parts detection in html code (part1, part2...)...


    Hi,
    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?

    Thanks.
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,996
    Rep Power
    9397
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    21
    Rep Power
    0
    Originally Posted by requinix
    What suffixes do you want to look for?
    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:
    - part1, part2
    - 001, 002
    - z01, z02

    but look like exist many more and that is reason why I asking for php class...

    Thanks.
  6. #4
  7. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,996
    Rep Power
    9397
    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.

IMN logo majestic logo threadwatch logo seochat tools logo