PHP help needed please

2 replies
In a script I'm writing I have a list of Clickbank hoplinks. What I want to do is find out, within the running of the script, what the final destination url is of each hoplink.

In other words, follow the redirects to their final destination and report back the sales page URL.

Does anyone have any idea how I can achieve this?

Thanks,

Martin
#needed #php
  • Profile picture of the author jonhel
    If I understand what you're asking correctly could you not store the link URLs in either a file or database and then query them.

    You could then use the header command to send the visitor to the page, e.g.

    header ('Location: http://www.clickbankhoplink etc/');

    Is this on the right track?

    Jonathan
    {{ DiscussionBoard.errors[426869].message }}
  • Profile picture of the author Darren Mothersele
    I think you can probably get this information from the headers returned by fetching the page with cURL.

    PHP: cURL - Manual
    {{ DiscussionBoard.errors[427257].message }}

Trending Topics