Forum Moderators: coopster
For example, on a forum site like webmasterworld.com, I'm looking for code to flag posts that contain:
[yahoo.com...]
www.yahoo.com
while ignoring:
[webmasterworld.com...]
www.webmasterworld.com
and relative URL's like:
/home.htm
/forum/index.php
$posted_url = 'whatever you find in the post text';
$your_url = 'exmaple.com';
$pos = strpos($mystring, $findme);if ($pos === false)
{
// It's an outside URL
}
else
{
// It's your URL
}
However, you would need some way to ignore relative links.