note 9913 deleted from function.preg-match-all by sniper
| From: | sniper@php.net | Date: | Tue, 30 Sep 2003 12:22:32 +0000 |
| Subject: | note 9913 deleted from function.preg-match-all by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57429@lists.php.net to get a copy of this message | ||
Note Submitter: rickyale@ig.com.br
----
//This example will list (actually put on an array) all the urls adresses from a specific $url,
where $url = "http://www.whatever.com"
$url = "http://www.catho.com.br/index.phtml";
$contents = Implode("", File($url));
preg_match_all("|href=\"?([^\"' >]+)|i", $contents, $arrayoflinks);
//Listing the array
While(List(,$link) = Each($arrayoflinks[1]))
Echo "$link<Br>";