Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO DISPLAY AND REFRESH WEATHER STATUS FOR PARTICULAR CITY IN MY APPLICATION

Status
Not open for further replies.

farzad321

Programmer
Sep 14, 2019
53
FR
I Want to show weather status in my application desktop or in window , Is there any way to do that ?

In other word can we connect to special server and get some data like weather or calendar details online ?

I do that in my weblog easily with just two line script code. Any Sample please...

thanks alot
 
Did you have a weather site in mind? Perhaps one in Iran?



If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Mike
I just need to display online weather status of one city , any server can get data accepted like google weather , accuweather , theweathernetwork

But I dont any Idea about how can comunicate with these server and obtain data

vfp can use any scipt cod like this ?

[highlight #FCE94F]<!-- Begin WebGozar.com Counter code -->
<script type="text/javascript" language="javascript" src=" ></script>
<noscript><a href=" target="_blank" rel="nofollow" >&#1570;&#1605;&#1575;&#1585;</a></noscript>
<!-- End WebGozar.com Counter code -->
[/highlight]

this is a cunter for visitor of one page


Or this script that can draw weather in on city in iE

[highlight #FCE94F][/highlight]
 
In a webbrowser control you can navigate to any website or display HTML by navigating to "about:blank" as URL and then set document body to your HTML.

How? You insert an OLE control on the form. A dialog pops up asking what OLE control and you pick Microsoft Web Browser

Then you can do:
Code:
Thisform.Olecontrol1.navigate(URL)

Bye, Olaf.

Olaf Doschke Software Engineering
 
You first need to find a service that will give you a weather feed. There are many of these around the world. Some are free, others demand a fee.

To get you started, here a couple of possibilities, both of which I have investigated in the past:


In general, it doesn't matter what country the site is situated in. They nearly all give forecasts for almost every country in the world.

Once you have decided on a service, you will need to find out what format they use for their feed. Usually this will be an XML file. VFP has tools to convert XML to FoxPro tables. But we can't give you any specific advice or sample code at this stage, because each service will have its own way of formatting its data. Usually, this will be documented on the site.

Your best bet is to decide which service you want to use, then find out as much as you can about the format of their data. If necessary, download a sample. After that, if you are still stuck, come back here for specific advice.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
thanks alot OLAF

I do that and my problem solved
thanks again to you and also Mike to help us
your are very kind
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top