XeroXer Posted May 8, 2006 Share Posted May 8, 2006 Hi there!This is what I want to be able to do.If I have a page. Let's say [a href=\"http://www.mywebpage.com/links.html\" target=\"_blank\"]http://www.mywebpage.com/links.html[/a].And I want to get all the links from that page listed for me in plain text.So if the page has these one:[code]<a href="http://www.otherpage.com/1.html">1</a><a href="http://www.otherpage.com/2.html">2</a><a href="http://www.otherpage.com/3.html">3</a><a href="http://www.otherpage.com/4.html">4</a><a href="http://www.otherpage.com/5.html">5</a>[/code]I want to get out this:[code]http://www.otherpage.com/1.htmlhttp://www.otherpage.com/2.htmlhttp://www.otherpage.com/3.htmlhttp://www.otherpage.com/4.htmlhttp://www.otherpage.com/5.html[/code]Anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/9293-listing-links-from-page/ Share on other sites More sharing options...
zq29 Posted May 8, 2006 Share Posted May 8, 2006 You could use preg_match(). Check [a href=\"http://www.regularexpressions.info\" target=\"_blank\"]http://www.regularexpressions.info[/a] for help with regex. Link to comment https://forums.phpfreaks.com/topic/9293-listing-links-from-page/#findComment-34246 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.