I've got a PHP script that does batch wgets from a database, but need to create a mechanism to generate folders so I can loop it all to save each file in its own folder...
Can one use regex to find the IDENTIFIER (which can be anything/any length, sometimes with underscores, sometimes with hyphens other times not) in following URL or is there some other way? I have no idea about regex...
http://cdn.blah.com/mp4/IDENTIFIER/somefile.mp4
For example, can one find IDENTIFIER and return it as a string? That way I can pass it to write "wget -O /somedir/" . $IDENTIFIER . "/"; and that would help greatly!
Any help very appreciated. Thanks!