So, let's say I'm on a website that has outbound links on it. Those links actually point to a file on the site (example.com/outbound/123) and that URL redirects to something else (an affiliate link) which redirects to a final link at the commercial website. I'm trying to figure out how to detect the URLs on each step of the way, so that I can uncover the affiliate link that is hidden in the middle step (to know what affiliate network is being used). How can I do this? Thanks.
parse for header informations ... like 302, 200, 404 etc. .... which language do you will use? ... PHP, C#? ...
Most of redirects use HTTP header. That can be detected by reading the HTTP header response of the URL. But some redirect use meta tag and even javascript. These methods should be detected by reading the body response of the URL.