Hello,
I am trying to download sunrise/set data from earthtools.org and has been succesfull but now it does not work anymore.
The steps done are;
1. get the location of a town from Google.com
2. get the timezone of the location from earthtools.org
3. get the sunrise/set times from earthtools.org
4. finally get the weather data from Google
All 4 parts use request and response objects but now the sunrise/set call does not return any data and goes to the errorlabel
Am I doing any thing faulty ?
My parameters are;
myLatitude = 52.0782886
myLongitude = 4.3136850
myTimeZone = 1
Also, when I do it manual, it works okee
(http://www.earthtools.org/sun/52.0782886/4.3136850/2/2/1/0)
Code;
Sub DownloadSunRiseSetData(myLatitude,myLongitude,myTimezone)
DOWNLOAD_DATA = ""
ErrorLabel(DownloadSunRiseSetDataError)
DoEvents
DateFormat("d/m")
Request.New1("http://www.earthtools.org/sun/" & myLatitude & "/" & myLongitude & "/" & Date(Now) & "/" & myTimezone & "/0")
Request.Method = "GET"
Request.TimeOut = 30000
Response.New1
Response.Value = Request.GetResponse
DOWNLOAD_DATA = Response.GetString
Response.Close
Return
DownloadSunRiseSetDataError:
Response.Close
DOWNLOAD_DATA = "Err"
Return
End Sub
I am trying to download sunrise/set data from earthtools.org and has been succesfull but now it does not work anymore.
The steps done are;
1. get the location of a town from Google.com
2. get the timezone of the location from earthtools.org
3. get the sunrise/set times from earthtools.org
4. finally get the weather data from Google
All 4 parts use request and response objects but now the sunrise/set call does not return any data and goes to the errorlabel
Am I doing any thing faulty ?
My parameters are;
myLatitude = 52.0782886
myLongitude = 4.3136850
myTimeZone = 1
Also, when I do it manual, it works okee
(http://www.earthtools.org/sun/52.0782886/4.3136850/2/2/1/0)
Code;
Sub DownloadSunRiseSetData(myLatitude,myLongitude,myTimezone)
DOWNLOAD_DATA = ""
ErrorLabel(DownloadSunRiseSetDataError)
DoEvents
DateFormat("d/m")
Request.New1("http://www.earthtools.org/sun/" & myLatitude & "/" & myLongitude & "/" & Date(Now) & "/" & myTimezone & "/0")
Request.Method = "GET"
Request.TimeOut = 30000
Response.New1
Response.Value = Request.GetResponse
DOWNLOAD_DATA = Response.GetString
Response.Close
Return
DownloadSunRiseSetDataError:
Response.Close
DOWNLOAD_DATA = "Err"
Return
End Sub