I want to check whether the link of my homepage (ex. http://www.xyz.com) is present in any particular site or not. Is there any way to check that?
Checking links in a web page
Moderator: General Moderators
Checking links in a web page
Hello I am a new member of this forum.
I want to check whether the link of my homepage (ex. http://www.xyz.com) is present in any particular site or not. Is there any way to check that?
I want to check whether the link of my homepage (ex. http://www.xyz.com) is present in any particular site or not. Is there any way to check that?
You can use the web tester in SimpleTest to verify links, if that's what you mean?
I'd think the only way to do it is to donwload the whole code of the site, then just do a search for "www.xyz.com" or whatever. If you're making it a robot type thing, then you could have it follow all the links it could finds on the page (use a regex like:
. That will only match URLs without paths after them (http://www.google.com, not http://www.google.com/ig), but you get the idea.) If you do it this way, be sure to follow the rules in robots.txt. Do a Google search to learn more.
Although that would work, you could just use Google. If you use 'link:www.xyz.com' in your google search, it will show you all the sites it has indexed which link to hte specified URL.
Code: Select all
preg_match('/([a-z]{3,5}://|)((?:[a-z])*\.)/i', $sourceCode, $matches)Although that would work, you could just use Google. If you use 'link:www.xyz.com' in your google search, it will show you all the sites it has indexed which link to hte specified URL.