HTML_DocumentDependencies / Net_URL problem

From: Date: Wed, 25 Jan 2006 11:10:59 +0000
Subject: HTML_DocumentDependencies / Net_URL problem
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41083@lists.php.net to get a copy of this message
Hi! Short time ago I started writing the HTML_DocumentDependencies class which is intended to have an easy way to parse an HTML file and to get a list of links, images,.. which could be stored in a database or wherever. (http://pear.php.net/pepr/pepr-proposal-show.php?id=338) (and to learn how to add classes to PEAR ;-) Now Justin told me to use the Net_URL class to represent urls found in document. Makes sense, but now I’ve a problem with the Net_URL class… It seems that it’s not possible to set the “context” of the url, meaning that I cannot define to which url a relative url is relative. (“./file.html” makes no sense if I don’t know where “.” is. ) I described this behaviour in a feature request: http://pear.php.net/bugs/bug.php?id=6541 which was closed as “Bogus”. So now I’m a little confused because currently I see no other way than parsing the (part of an) url and create a full uri if I want to have the right data in Net_URL object. … Would be great if someone could take a look at it and give me a hint if ‘v overlooked something… Thanks. Chris

« previous php.pear.dev (#41083) next »