Job description
Hello,
I have a file hosting service that has a feature that allows users to download files from other file hosting services. The user pastes a link to the file into the field and the script downloads the file.
The order is to add a function so that before starting the download, the script first checks if a file with that name is already in the database of my service. Based on the file name found in the link itself. If it is found, then it redirects to a subpage of that file (each file has its own subpage). If the file is not in the database of my service, then, of course, the (existing) script downloading the file should follow.
The file name should be read from a link that looks like this: https://strona.pl/hash/nazwa.pliku.rar.html
Loading to the "/" character which is between the hash and the file name. When reading the file name, the script should ignore the ".html" suffix, which is in some links and not in some.
Redirecting to the file page can consist of reading the "shortUrl" and "originalFilename" fields from the database, which looks like this: https://i.imgur.com/B8TFStg.jpg
The link to the file page looks like this: https://strona.pl/2T9/przykladowy.plik.rar
Permanent cooperation possible.