cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Redirecting with PHP and libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Nov 2005 16:48:12 +0100 (CET)

On Thu, 10 Nov 2005, Roman Uhlig | Knuepfer Verlag wrote:

> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, $_GET['target_url']);
> curl_setopt($ch, CURLOPT_REFERER, "h**p://www.website-c.com/");
> curl_exec($ch);
> curl_close($ch);
>
> Now website "C" appears as REFERER in the webstats of website "X". Until
> here everything is fine, except:
> I would have to filter the target website through a proxy script, or all
> relative links on it would refer to website "C" instead of website "X".

Unless you manage to insert a <base href=""> into the <head> section of the
HTML pages you download.

> Since I don't know what type of external website my links would end up, I
> don't think thats a good idea.

To be honest, this whole thing sounds like a bad idea to me.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-11-10