IMHO.WS

IMHO.WS (http://www.imho.ws/index.php)
-   Программирование (http://www.imho.ws/forumdisplay.php?f=40)
-   -   Visual Basic & Reading HTML code from URL??? (http://www.imho.ws/showthread.php?t=49554)

Lord Skill 24.01.2004 20:15

Visual Basic & Reading HTML code from URL???
 
voobshem mne nado schitat' - HTML dokument ot nachala do konca i pomestit' ego v peremennuju
ispol'zuju dlja e'togo -
Inet1.OpenURL "http://....", icString
no on schitqvaet tol'ko pervye - 1238 simvolov
a v drugom sluchae
Inet1.OpenURL "http://...."
Inet1.GetChunk (99999)
- no ego tozhe do konca fajla ne hvataet =(
proshu pomoshi!!

RaZEr 24.01.2004 20:25

Код:

Dim strURL As String
Dim bData() As Byte      ' Data variable
Dim intFile As Integer  ' FreeFile variable
strURL = _
"ftp://ftp.microsoft.com/Softlib/Softlib.exe"
intFile = FreeFile()      ' Set intFile to an unused
                        ' file.
' The result of the OpenURL method goes into the Byte
' array, and the Byte array is then saved to disk.
bData() = Inet1.OpenURL(strURL, icByteArray)
Open "C:\Temp\Softlib.exe" For Binary Access Write _
As #intFile
Put #intFile, , bData()
Close #intFile


Lord Skill 24.01.2004 20:50

RaZEr

Код:

Dim strURL As String
Dim bData() As Byte      ' Data variable
Dim intFile As Integer  ' FreeFile variable
strURL = "http://superchat.ee/"
intFile = FreeFile()      ' Set intFile to an unused
                        ' file.
' The result of the OpenURL method goes into the Byte
' array, and the Byte array is then saved to disk.
bData() = Inet1.OpenURL(strURL, icByteArray)
Open "C:\index.htm" For Binary Access Write _
As #intFile
Put #intFile, , bData()
Close #intFile

tozhe 1238 simvolov schitqvaet
NB!! - mne nado schitat' imenno HTML code!

RaZEr 24.01.2004 20:54

Другой файл с другого сервера считать попробуй.

Lord Skill 24.01.2004 21:05

RaZEr
da mail.ru chitaet - no problemma v tom chto mne imenno tot nado schitat' - i ja ne mogu ponjat' v chem problemma !?
kak-to ved' mozhno - tem bolee esli sozdavat' InternetBrowser - to on ego v okoshke otkrqvaet - a mne nuzhno poluchit' Source =(

RaZEr 24.01.2004 21:11

GetChunk(1024) циклом попробуй (пока не начнет возвращать пустую строку).

Lord Skill 24.01.2004 21:23

RaZEr
Thanks - vse rabotaet > 5 tebe


Часовой пояс GMT +4, время: 11:29.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.