How do I get started putting current weather conditions on my website?

  • 1
  • Question
  • Updated 6 years ago
How do I get started putting current weather conditions on my website? I I basically need wind speed, direction and temperature. Are there tutorials to help me get started?
Photo of TCRCC

TCRCC

  • 1 Post
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of DrewDelzer

DrewDelzer

  • 2 Posts
  • 1 Reply Like
Here's what I'm doing, and I'm almost certain it's not the correct way but it work for me. First I took my xfile.htm and rename it xfile.php. Then within that file, above the closing tags I placed the following "" without the beginning and ending quotation marks. The file WeatherData.php contains all the coding I use to place my weather data on xfile.php. Code WeatherData.php just like you would any html file but place your php coding within tags for example;

==
In another php file I make the Weather Underground API calls and parse the weather data and place that weather data in a text file like CurrentTemp.txt. I would recommend searching the wunderground.com site for their Code Samples. Also remember that Google and Bing are your friends, since I'm not a php or html coder by trade any question I have I do an internet search.

Have fun
Drew
Photo of DrewDelzer

DrewDelzer

  • 2 Posts
  • 1 Reply Like
Sorry, it appears the Board Gods have removed my code snip-its.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
I think there's some code detection in the forum so you can't post it. I'm not sure why. We didn't take it down, but yes, it looks like some back end 3rd party code did. This is a great write up though, and if you posted links to the files instead of the code, that might work better. Thank you for taking the time to answer a new developer!