473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Weather forecast

1
Hi all...

I want to put a forecast inside my website, I dont know the script for that, please help me to solve this problem yaa....

tq
Jul 19 '07 #1
7 5729
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Usually, most respectable weather forecast websites will offer scripts that you can use on your website.
Jul 19 '07 #2
I’m looking for someone capable to make a script for weather forecast cities (Italy) for a new weather site web

I buy script language, then I will supply in the output and the final parameters.

Have you got some solution for this problem?
Best regards
Francesco Nucera
Sep 14 '07 #3
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

If this is a job offer, post it in the Jobs forum. If you're attempting to do this yourself and need some help, then that's what this forum is for.
Sep 14 '07 #4
Hi ,

Please Send Some Weather Forcat WEbsites Scripts or any Code for
inbuilt in my website



Welcome to TSDN!

Usually, most respectable weather forecast websites will offer scripts that you can use on your website.
Jan 9 '08 #5
I’m looking for someone capable to make a script for weather forecast cities (INDIA) for a new weather site web











Welcome to TSDN!







Usually, most respectable weather forecast websites will offer scripts that you can use on your website.
Jan 9 '08 #6
acoder
16,027 Expert Mod 8TB
Hi ,

Please Send Some Weather Forcat WEbsites Scripts or any Code for
inbuilt in my website
Find a weather forecast website which displays the weather forecast as you would like them. If they give you permission to display it on your website, they will probably have a ready-made script that you can include on your own website.
Jan 9 '08 #7
try this!
Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  3. <HTML>
  4.  <HEAD>
  5.   <TITLE>IP_Weather</TITLE>
  6.   <script type="text/javascript" src="http://j.maxmind.com/app/geoip.js"></script>
  7.   <SCRIPT type="text/javascript">
  8.     var weather={"onReady":false};
  9.  
  10.     function IpWeather()
  11.     {
  12.         var xmlhttp=false;
  13.        /* Create a new XMLHttpRequest object to talk to the Web server */
  14.  
  15.         /*@cc_on @*/
  16.         /*@if (@_jscript_version >= 5)
  17.         try
  18.         {
  19.              xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  20.         }
  21.         catch (e)
  22.         {
  23.             try 
  24.             {
  25.                  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  26.             } 
  27.             catch (e2) 
  28.             {
  29.                 xmlhttp = false;
  30.             }
  31.         }
  32.         @end @*/
  33.         if (!xmlhttp && typeof XMLHttpRequest != 'undefined') 
  34.         {
  35.             xmlhttp = new XMLHttpRequest();
  36.         }
  37.  
  38.         xmlhttp.open('GET', 'http://www.google.com/ig/api?weather='+geoip_city(), true);
  39.         xmlhttp.send("");
  40.  
  41.         xmlhttp.onreadystatechange = function()
  42.         {
  43.             if (xmlhttp.readyState == 4)
  44.             {
  45.               var weatherXML = xmlhttp.responseXML;
  46.               
  47.                 var now = weatherXML.getElementsByTagName("current_conditions")[0];
  48.                 var now_t = now.getElementsByTagName('temp_c')[0].getAttribute('data');
  49.                 var now_w = now.getElementsByTagName('wind_condition')[0].getAttribute('data');
  50.                 var now_c = now.getElementsByTagName('condition')[0].getAttribute('data');
  51.                 var now_h = now.getElementsByTagName('humidity')[0].getAttribute('data');
  52.  
  53.                 var today = weatherXML.getElementsByTagName("forecast_conditions")[0];
  54.                 var t_max = today.getElementsByTagName('high')[0].getAttribute('data');
  55.                 var t_min = today.getElementsByTagName('low')[0].getAttribute('data');
  56.  
  57.                 //put weather information in JSON,change onReady=True
  58.                 weather={"t_now":now_t,"wind":now_w,"cloud":now_c,"humidity":now_h,"t_max":t_max,"t_min":t_min,"onReady":true};    
  59.             }
  60.         }    
  61.     }
  62.  
  63.     IpWeather();
  64.  
  65. </SCRIPT>
  66. </HEAD>
  67.  
  68. <BODY>
  69. <div id='target'></div>        
  70. </BODY>
  71.  
  72. <script type="text/javascript">
  73.         function weatherInfo()
  74.         {
  75.             if(weather.onReady)
  76.             {
  77.                 document.getElementById('target').innerHTML="Weather:"+weather.cloud+" Temperature now:"+weather.t_now+"℃ whole day between:"+weather.t_min+"--"+weather.t_max+"℃  "+weather.humidity+" "+weather.wind;
  78.             }
  79.             else
  80.             {
  81.                 document.getElementById('target').innerHTML="loading....";
  82.                 setTimeout("weatherInfo()",100);
  83.             }
  84.         }
  85.         weatherInfo();
  86. </script>
  87. </HTML>
  88.  
  89.  
Oct 11 '10 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: futureofphp | last post by:
Hi I am having a PHP based intranet home page. How can I add local weather forecast for the day to it? Is there any free weather forevast providers? I am interested in the local weather of Europe....
2
by: Selçuk Giray Özdamar | last post by:
Hi, I'm looking for a public web service about the weather forecast , (for all of the cities in the world), is there any web service? Thanks...
1
by: VNN | last post by:
I'm working on a project to get weather info for my company and would like to know if there's any good weather web services site I can subscribe to? Current temperature, 12-hour temperature...
1
by: pmclinn | last post by:
I have the xml feed belowfrom this link: http://www.weather.gov/alerts/ct.rss I for the life of me can not get this data to format in a html table using client side scripting. Any help would be...
9
by: StewartS | last post by:
Hi there, I'm looking to display the Yahoo Weather feed on my website (http://developer.yahoo.com/weather/). I am using Visual Web Developer 2005. Everything works fine while parsing normal...
4
by: shaynenash | last post by:
I wrote this script to calculate if water restrictions were in place if it was hotter than 25deg C. It has turned out to be a pretty good weather widget that can be used elsewhere. This was initially...
2
by: Craig M | last post by:
Our current intranet site displays the weather with a 7 day forecast. We have to manually enter all the weather info into a SQL DB using a web front end, but would like to use an RSS feed. All...
1
by: akumar8k | last post by:
when i am excusing the below code i am getting the error. Error 1 − <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> − <SOAP-ENV:Body> −
1
by: Wei Jia | last post by:
1.Ajax. 2.http://j.maxmind.com/app/geoip.js for get client city. 3.Google weather API. IE test is passed!But others browser can't,why? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.