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

curl-and-php

Re: Resolving URL's in curl.

From: Laurie Barker <laurie_at_oneuponedown.co.uk>
Date: Fri, 26 Sep 2003 11:55:11 +0100

Hello

Curl is designed to fetch items across the internet akin to a browsers and
does not manipulate the retrieved content.

The simplest way to achieve being able to view the fetched page on another
server whne the page has relative links, is to add:

<base href="<the domain from which the page was fetched>">

before outputting the content of the page. This will fix broken relative
links for most tags.

On 26/09/2003 04:00 you wrote:
> When I get a web page is it possible to resolve the url's in thing like
> 'img' and 'a' tags ?
>
> Here's an example of and image tag after a curl get:
> <img name="between4" src="images/between4.gif" width="10" height="12"
> border="0" alt="">
>
> I'd like the 'src' attributes to be resolved fully to the URL is belongs to.
> In this case it would look like:
>
> <img name="between4"
> src="http://www.sunrisehomes.com.au/images/between4.gif" width="10"
> height="12" border="0" alt="">

--
OneUpOneDown Creative Solutions Ltd
--
Laurie Barker
--
T: +44 (0)20 8527 4440
--
F: +44 (0)20 8527 4527
--
E: laurie-barker_at_oneuponedown.co.uk
--
W: http://www.oneuponedown.co.uk
--
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-26