How can I obtain a relative link when using the following function
From: tim koster (tim.koster_at_gmx.net)
Date: 11/28/03
- Next message: Catalin Trifu: "GD2 Fonts"
- Previous message: Chris Garaffa: "Re: [PHP] Telling GD2 Where Fonts Are"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Nov 2003 23:41:00 -0800
hi,
i am using the code below, to fetch information from another webpage
(e.g. www.testpage.com). i fetch the text from the word "begin_text"
zu the word "end_text".
I would like to fetch complete links instead of relative links. at the
moment the fetched link looks like this "../smile.gif". insted of
this i would like to retreive the original "full" link
("http://www.testpage.com/smile.gif"). is this
possibloe in php?
tim
function string_zerlegen ($gesamt, $startstring, $endstring)
{
$zwischen=explode ($startstring, $gesamt);
$ergebnis=explode ($endstring, $zwischen[1]);
return $ergebnis[0];
}
{
$url="http://www.testpage.com";
$starttext="begin_text";
$endtext="end_text";
$seite= implode ('', file ($url));
echo string_zerlegen ($seite, $starttext, $endtext);
}
- Next message: Catalin Trifu: "GD2 Fonts"
- Previous message: Chris Garaffa: "Re: [PHP] Telling GD2 Where Fonts Are"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|