|
|
|
кто подскажет что не как
|
|||
|---|---|---|---|
|
#18+
Этот кусок должен выциплять из инета картинку, он подлец не хрина не выцепляет только атребуты файла using System; using System.Collections.Generic; using System.Text; using System.Data.Sql; using System.Data.SqlClient; using System.Net; using System.IO; namespace Z0003 { class Program { public static void Main() { WebRequest req; WebResponse rsp; Stream rstrm; string strmName; int strmNum = 0; int cRead; byte[] buff = new byte[1024 * 1024 * 26]; FileStream fstrm; req = WebRequest.Create("http://www.inter.auto.ru/images/G/4e62af90.jpg"); rsp = req.GetResponse(); rstrm = rsp.GetResponseStream(); strmName = string.Format("ztest.{0:000}", strmNum); Console.WriteLine("Write to {0}", strmName); strmNum++; fstrm = File.Create(strmName); do { cRead = rstrm.Read(buff, 0, buff.Length); fstrm.Write(buff, 0, cRead); } while (cRead == buff.Length); fstrm.Close(); fstrm = null; rstrm = null; rsp.Close(); rsp = null; req = null; } } } ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.10.2006, 16:25:00 |
|
||
|
|

start [/forum/topic.php?fid=18&fpage=865&tid=1389024]: |
0ms |
get settings: |
8ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
65ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
26ms |
get tp. blocked users: |
1ms |
| others: | 211ms |
| total: | 346ms |

| 0 / 0 |
