Jump to content

[SOLVED] How to search for a href links in the content


ted_chou12

Recommended Posts

I wish to know the string to use when you are using the function preg match, and grab the link in the a href of the html codes see the eg below:

This is a <a href="link.php">link</a>, please visit!

I wish to know how to get the link.php of the eg. shown using preg match function.

Thanks

Ted

sorry, I wish to add something here, I want links of my own domain, so that:

This is a <a href="link.php">link</a>, please visit!

This is a <a href="http://mydomain.com/link.php">link</a>, please visit!

This is a <a href="http://www.mydomain.com/link.php">link</a>, please visit!

Will all work, however:

This is a <a href="http://otherdomains.com/link.php">link</a>, please visit!

This is a <a href="http://www.otherdomains.com/link.php">link</a>, please visit!

will not work.

and whatever form the link is in, I only want the link of my pages in the form link.php, or somedirectory/link.php.

Thanks again.

Ted

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.