Page 1 of 1

Checking links in a web page

Posted: Sun May 22, 2005 1:39 am
by amlan_08
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? 8O

Posted: Sun May 22, 2005 4:37 am
by McGruff
You can use the web tester in SimpleTest to verify links, if that's what you mean?

Posted: Sun May 22, 2005 4:53 am
by hongco
it seems that amlan_08 wanted to find out who hotlinks his/her site - or posts his/her links on other site.

Google

Posted: Sun May 22, 2005 6:35 am
by traherom
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:

Code: Select all

preg_match('/([a-z]{3,5}://|)((?:[a-z])*\.)/i', $sourceCode, $matches)
. 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.