Jump to content

Gather links?


magnetica

Recommended Posts

What exactly do you mean? Do you mean there is a website which has lots of <a href=...> tags that you would like to find and get the addresses of the websites they link to?

 

If so, then yes, its completely possible. You'll firstly need to get the contents of the website, which can, in most cases, be achieved with the use of the file_get_contents() function. With some websites, you will need to use cURL however.

 

Once you have the contents of the website in a string, you'll need to use regular expressions to find the links. You'll be wanting the preg_match_all() or the ereg() functions for that.

 

Edit: I just noticed you said 'using html'. If thats what you meant, then no, its not possible. I misread that as 'using php'.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.