In most of the musical site i found that, they use to write below thing in Policies:
On this website(www.Indiamp3.com) you find links that lead to audio files. These files are stored somewhere else on the internet and are NOT a part of this website. Indiamp3.com does NOT carry ANY responsibility for them, Indiamp3.com ONLY COLLECTS links and INDEXES other sites contents. Our website is fully automatized. This means that we are crawling other mp3 websites and directories, indexing them and then linking to those mp3 files they offer. Indiamp3.com respects the american DMCA laws.
If your copyrighted material has been indexed by Indiamp3.com and you want this material removed, you must provide a written communication with exact reference to the content you claim ownership to. This message must contain following:
How to do such indexing, if I have link of an file on other website?
If I understand correctly you are probably looking for this - http://en.wikipedia.org/wiki/Web_crawler