I want to make a program that would convert the link (getting a direct link), I will describe the algorithm:
The user inserts the following link into the textbox
http://example.com/download/тутданные/file-name.jpg.html/
.The program of this link takes a fragment (here), assigns it to some variable.
Sends a post request to the host
http://example.com/download/getlink
with parameterssekret=тутданные,action=getlink_file,downloaded=1
Gets the answer to the following
http://какой-то-сайт/api/web/getInstaller?transaction_id=79610604&token=b48aa6bae41a37394677dfe57d3f1a7a&return_url=http%3A%2F%2Fs1.test.ru%2Fu%2Fcdaba1f3138e2e72a3a119b391c52aa4%2F67c00066b6%2FYKuRUX22rvI.jpg
)From this link we take only this part of
http%3A%2F%2Fs1.test.%2Fu%2Fcdaba1f3138e2e72a3a119b391c52aa4%2F67c00066b6%2FYKuRUX22rvI.jpg
Open the received link open in the browser.
How to implement it? If you'll post examples, please comment each line.