Autor | Zpráva | ||
---|---|---|---|
warezov Profil |
#1 · Zasláno: 15. 8. 2010, 12:29:28
Ahoj všem:
Mám následucící kód který se připojí k počáteční adrese url a poté stáhne zdrojový kód do proměnné SOMESTRING. Já potřebuju tento kód vložit do cyklu,tak aby pracoval kontinuálně. Děkuji za rady. Zde je kód: Dim webResponse3 As System.Net.HttpWebResponse = Nothing Dim webRequest3 As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.wikipedia.org") webResponse3 = DirectCast(webRequest3.GetResponse(), System.Net.HttpWebResponse) Dim srResp As System.IO.StreamReader srResp = New System.IO.StreamReader(webResponse3.GetResponseStream()) Dim SOMESTRING As String SOMESTRING = srResp.ReadToEnd TextBox1.Text = SOMESTRING 'vyseparovani odkazu Dim PositionOfHref As Integer = SOMESTRING.IndexOf("<a href=") Dim Help As String = SOMESTRING.Substring(PositionOfHref) 'RETURN <A HREF="NECO.HTML"> ......................</HTML> Dim FirstIndexOf As Integer = Help.IndexOf(">") 'return position of first index of > Dim Href As String = Mid(SOMESTRING, PositionOfHref, FirstIndexOf + 2) Ps.: Cykly mě moc nejdou |
||
Chamurappi Profil |
#2 · Zasláno: 16. 8. 2010, 11:08:55
Reaguji na warezova:
„Ps.: Cykly mě moc nejdou“ Tohle je spíš zadání na rekurzi než na cykly. Pokud ti nejdou ani cykly a neumíš si najít dokumentaci k nim, najmi si nějakého začínajícího programátora. |
||
Časová prodleva: 14 let
|
0