Hello,
I am trying to find links in members pages, making sure a pre-determined link is present on the html. I am having some problems tho.
Some members use a full url for the link, some only the base dir/file.
So i use the function basename() on the pre-determined full url i want to check to make sure i only check the base dir.
i am using preg_match as such:
This works for links like:PHP Code:preg_match ("|<[aA] (.+?)".basename($links_full_url)."(.+?)>(.+?)<\/[aA]>|i", $result, $matches);
http://www.dynamicdrive.com/forums/ i end up searching for "forums" and if the page i look into has:
orHTML Code:<a href="/forums/">whatever</a>
orHTML Code:<a href="http://www.dynamicdrive.com/forums/">whatever</a>
all valid links, it will find them and its fine.HTML Code:<a href="forums">whatever</a>
however!
If the full url link is something like http://www.dynamicdrive.com/forums.php i end up searching for "forums.php" and my preg_match cant find it. It can find "forums.p" tho, strange :(
Any help please?

