View Full Version : Curl hop link grabber

03-17-2008, 04:29 AM
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.

03-17-2008, 01:49 PM
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!!!