I am developing an application in which I have to check whether a link exists on botw.org for a given URL. Is there any free API available to check botw.org, or any other source to check this?
thanks!
I am developing an application in which I have to check whether a link exists on botw.org for a given URL. Is there any free API available to check botw.org, or any other source to check this?
thanks!
You need a crawler. It's pretty trivial to build one yourself (for small crawls!)
For a small site (few thousand pages) you can probably do all this in memory.
** Use the usual java URLConnection or commons HTTPClient (v4) for making the requests.
Note: finding your link - links can exist on a site in absolute, local or resolved to some base href. You'll need to account for this when looking for yours. Easiest is to translate all links to absolute form, taking care to resolve to the current pages base href, if it has one.
Simples.
You will have to crawl the site, parse each page for anchors, and test if they match what you are looking for... assuming they are not using javascript to create links, few people do.
A standard XML parser will work, SAX is probably the easiest to learn.
You can use the search page:
Example: http://search.botw.org/search?q=stackoverflow.com
Instead of crawling the entire site, you can just verify if you get a good result there.