getting img url

hey, i just found this forum...how cool.
question:
does anybody know code or know where i can get the code to get a certain image URL from user? say user input URL from shell prompt when run the program. What is the code to take that URL open internet and download the image.
thanks alot.

I won't give it all away but I will give you some pointers.

You can use wget to pull the HTML from a page and then use sed, awk, perl, or most anything thing else that uses regular expressions to pull the img tags and then pull the image automagically.

thank you.
so wget is a program that i need to activate to get the URL.