Topic: final destination of a link (Read 563 times)
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« on: Dec 15, 2006, 10:50:07 PM »
Is it possible to retrieve the destination of a link, when it gets redirected? Many affiliate programs use a 3rd party to pay the affiliates. To track sales the promotion of the product links to the 3rd party website. For instance: a link would point to www.3rdpartyprocessor.com/productId/myAffiliateId when someone clicks the link they will end up at: www.producthomepage.com Is there any way I can retrieve the second URL when I only know the first one?
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« Reply #1 on: Dec 15, 2006, 11:00:03 PM »
I just found out that a download with cURL will download the content of the second URL. how to download a file with cURL and php If I look thru the downloaded source I can see from which page it is, but this is because the page I retrieved contains some images coded as: src="http://www.domain.com/images/image.gif" Surely a lot of pages retrieved will not contain the domain name in the code but just use: /images/image.gif so my problem has not been solved yet...