jhylands

Weather

Feb 4th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.02 KB | None | 0 0
  1.     Public Sub getweather(ByVal location As String, ByRef max As String, ByRef min As String, ByRef description As String, ByRef windspeed As String)
  2.         Dim allweather As String
  3.         allweather = getpageHTML("http://www.weathermonkey.co.uk/postcode/c/" & location & ".php")
  4.         allweather = Mid(allweather, InStr(allweather, "<table"), Len(allweather) - InStr(allweather, "<table"))
  5.         description = Mid(allweather, InStr(allweather, "<b>") + 3, InStr(allweather, "</b>") - InStr(allweather, "<b>") - 3)
  6.         min = Mid(allweather, InStr(allweather, "Min temp:") + 9, InStr(allweather, "&") - InStr(allweather, "Min temp:") - 9)
  7.         allweather = Mid(allweather, InStr(allweather, "Max temp:"), Len(allweather) - InStr(allweather, "Min temp:"))
  8.         max = Mid(allweather, InStr(allweather, "Max temp:") + 9, InStr(allweather, "&") - InStr(allweather, "Max temp:") - 9)
  9.         windspeed = Mid(allweather, InStr(allweather, "Wind speed:") + 11, InStr(allweather, " mph") - InStr(allweather, "Wind speed:") - 11)
  10.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment