For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2004 > PHP: extract links AND description from html









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PHP: extract links AND description from html
Nils Jansen

2004-10-23, 3:55 pm

extracting just the links from a webpage is no problem for me ->
regex /<a ([^>]*)>/i

but now i want to extract the link and the discription that stands between
the <a href=> and the </a> tag.

as a result from the script that i'm searching for, i want to get the full

<a href=http://www.blabla.com/test/d.html>DESCRIPTOIN</a>

can anybody give me some hint, how to do this?




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com