Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Thanked 3 Times in 3 Posts

    Curl hop link grabber

    Hi guys,

    How can i use curl to follow an affiliate link from clickbank. ex (http://affid.Vendorid.hop.clickbank.net)

    I just want to grab the destination url and return it. I'm confused because the affiliate link has some redirects.

    So if my destination url is http://myexample.com, i want to take this url and input it into my sql database.

  2. #2
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Thanked 28 Times in 27 Posts
    i created a page that would farm links etc from sites (for my education only). I used fopen and preg_match_all.

    Use google to search on regular expressions and find one for url's, use that to find all the links on a page that as been returned by the remote server. Once you get all the links they are put into an arry by the function preg_match_all, you then just loop until each link as been inserted into the DB.

    There u go it as easy as that!!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts