Hi,
I've seen a number of ways that you can harvest images from other sites, but I'd be interested to know what you think the best ways are. The bit og a grey area for me is how read the image, as it could be small or large.
This is the type of thing I'm thinking of:
private static byte[] GetBytesFromUrl(string url)
{
byte[] bytes;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
WebResponse response = req.GetResponse();
Stream stream = response.GetResponseStream();
using (BinaryReader br = new BinaryReader(stream))
{
bytes = br.ReadBytes(1024000);
br.Close();
}
response.Close();
return bytes;
}
How can I read the butes up to the end rather than specify chunks?
...
Go to the complete details ...