curl-library
Re: how to filter redirections
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 4 Apr 2011 22:41:23 +0200 (CEST)
Date: Mon, 4 Apr 2011 22:41:23 +0200 (CEST)
On Mon, 4 Apr 2011, moi wrote:
> I have to track some sites using curlpp. When i download, some site open
> popup coming from ads or porno servers. I'd like to block those popup
> telling curl to follow redirections, but either to blacklist some sites, or
> to allow only redirection in the asked site.
If CURLOPT_FOLLOWLOCATION isn't good enough (unconditionally following HTTP
redirects to the protocols you allow) you can _easily_ do the redirect
following yourself using curl_easy_getinfo and CURLINFO_REDIRECT_URL and then
you can black/whitelist the URLs all you like or whatever you decide is right!
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-04-04