The steps might be:
Ask the user for a url in a html form.
Store that url in a database table
Use cURL to fetch that data
store the data as a string in your database table
cache the data in a file
do some post download analysis, and store the extracted data in your database table