November 20th, 2000, 02:49 PM
i onece found some code so perl could put all the values in the <a href""> tags in an array, now i was wondering is there is a way for PHP to do the same, i want's to type in an url or some local file, and then php takes all the links and puts them in an array for me, can this be done??
November 20th, 2000, 08:43 PM
There's nothing that can't be done
You could do it with some regular expressions... like something like this:
preg_match("/<A.+HREF="(.+)".*>/", $page, $matches);
then theoretically $matches would be an array of all the urls in <A HREF=""> tags on the page. I haven't tried it so don't stake your life on it...
Hope that helps,