For a project I am currently working on I am looking for a solution that
gives me an ordened list of all the URLs that are in a redirect chain.
Lets say I have an URL x, clicking this in a normal browser would
redirect to y, which would redirect me to z; my final destination.
Having just URL x, how can I get URL y and z? Do I need to use cURL to
extract the heads recursively from all urls until there are no more
redirects? How would I go about doing this?