Get links from a page
| From: | Julio Nobrega Trabalhando | Date: | Fri, 07 Dec 2001 13:13:50 +0000 |
| Subject: | Get links from a page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-77036@lists.php.net to get a copy of this message | ||
Hi all,
I was sure I saw something like this on this list one month ago. But I
search for like dozens of word combination to find this post (or anything
related to), and was unsuccesful.
Anyone has a quick snippet that will scan a bunch of text characters and
return the links as an array element?
Something like:
text to search:
<a
href="http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4
776">Proprietário que retoma imóvel negociado responde pelas despesas
condominiais atrasadas</a> <a
href="http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4
775">Ouro Preto garante no STJ o recebimento de parcela de ICMS da Vale do
Rio Doce</a>
And it could return:
$array = Array();
$array[] =
'http://http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia
=4776';
$array[] =
'http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4775';
Thanks a lot, and again sorry if this is a duplicated question, but I
really did not find.
--
Julio Nobrega
Don't eat the yellow snow.