Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
finding links in a web page
Old 07-08-2006, 11:09 AM finding links in a web page
Junior Talker

Posts: 4
Name: anders
Trades: 0
Hi

I have been looking for a function that finds links on a web page, i have used get_meta_tags() and file_get_contents() to get data off of a web page and wondered if there was something similar to get URLs. If not what would be simple and logical way to get URLs off a page?
Solaar is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-08-2006, 11:33 AM Re: finding links in a web page
Novice Talker

Posts: 5
Name: Alyssa Rabe
Trades: 0
I think that the only way to do this is to (a) extract all link (<A>) tags from the document, and (b) extract URLs from their 'href' parameters. This can be done either by using regular expressions or by using string functions.

However, the above approach will not allow you to extract 'pseudo-links', such as javascript OnClick handlers. It's also a good idea to extract values of 'action' parameters of a <FORM> tags.

With best wishes,
Alyssa Rabe
Espherie Design Team (http://www.espherie.com)
allyvera is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to finding links in a web page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25363 seconds with 12 queries