Click here to Skip to main content
16,016,770 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get all images (ImageName + ImageUrl + Image Alt Text) from a webpage from given URL...

like


void ExtractImages(char* URI_Address)
{
        ???
}



Thanks in advance... :D
Posted
Updated 23-Aug-11 6:53am
v2

That depends on where you are doing the work. On the client-side you can use JavaScript

$("img".each(function()
{
  var src = $(this).attr("src");
  var alt = $(this).attr("alt");
}


In code-behind or a Windows app yo would need to get the response stream from teh requested URL and parse the text for img tags.
 
Share this answer
 
Comments
Tech Code Freak 24-Aug-11 0:06am    
My 5!
And on top of what Mark already mentioned, you would have to make specifc requests for each image you found, and save the response as an image file on your own machine. Just so you have a heads up, you're looking at a considerable amount of code.
 
Share this answer
 
v2
Comments
Tech Code Freak 24-Aug-11 0:06am    
My 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900