I am using C# download method to download an image the image gets downloaded but its no use its empty or what we say corrupt image does not open.
The issue is the image has unusual link :
http://www.example.com/image1.php
Instead of others like :
http://www.example.com/img1.jpg
So how to download such images, if i go to the image using browser and click save as its downloads fine.
Code:
System.Net.WebClient client = new System.Net.WebClient();
picname = "testingimage";
client.DownloadFile(imagepath, filepath + picname + ".jpg");
Let me know if there is some other ways to do it rite.
Image url :
<img src="http://www.abx.com/img1.php" alt="http://www.abx.com/img1.php" class="decoded">
I SOLVED IT BUT USING A LONG ROUTE CREATE ANOTHER THREAD TO LOGIN GOTO THAT PAGE AND SAVE THE IMAGE USING
WEBBROWSERCONTROL :Code to save Image: