Extracting urls from HTML

From: Date: Wed, 25 Oct 2000 23:47:17 +0000
Subject: Extracting urls from HTML
Groups: php.general 
Request: Send a blank email to php-general+get-21972@lists.php.net to get a copy of this message
Hi, I need to extract the list of links from a html file. Ideally I will get them into an associative array where the name part equals the text between <a href...> and </a>, and the value part contains the actual URL. I've been looking at the available string functions, and I can't seem to find a way. Is there a class or library that does this? I'm too lazy to figure out how to write a parser for this, atleast what I'm trying to do doesn't warrant that kind of effort. I have a pretty large bookmark file, and I want to store just the links and names in a text file. Thanks, Srini

« previous php.general (#21972) next »