Our teacher tells us to add a crawl functionality that will get information from other databases online... is this legal, cause i think it's not

Very tricky question with, going by the US courts, a leaning toward it being a bad idea.
But, it all depends on what you are scraping (facts vs data), how you are scraping it (have accessed a private page) and how much harm you are doing to the affected party and how you intend to use.
Reselling the information or using it in some competitive way against the owner of the data would almost certainly get you in trouble.
Writing a screen scraper just to prove you can... no real harm in that. You can read the web page after all.
N.b. I'm have no legal background or qualifications, just so we're clear.

In the sense of "I have a cinema app and I want IMDB's movie data for the films playing" or more like "let's see what the NSA is up to these days"? (don't scrape us, we'll scrape you!)

2015-01-21--1421827025_100x30_scrot.png

Nice try NSA, nice try.

In all seriousness, some sites (like this one) provide public API's for their data.

commented: lol! +13

thanks for the insights guys.i highly appreciate it