WXforum.net
May 19, 2013, 04:12:47 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6609  •  Posts: 178272  •  Topics: 18103
Please welcome TargY, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: User zipcode forecast?  (Read 703 times)
0 Members and 1 Guest are viewing this topic.
prvrt
Contributor
***
Offline Offline

Posts: 116


WL7COQ


WWW
« on: May 14, 2010, 12:49:55 AM »

I would like to be able to allow the user once they get to my forecast page that shows my local forecast to be able to input their own zip code and get a forecast for their area. Any one done this and have the code?
Logged

Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
2-Panasonic BL-C131A Cameras
Blackfoot, Idaho
weatherforyou
Forecaster
*****
Offline Offline

Posts: 461


My weather is on WeatherForYou.com. Is yours?


WWW
« Reply #1 on: May 14, 2010, 01:03:10 AM »

The free HAMweather scripts will do this.

http://www.hamweather.com

They also can display your current conditions for your town (if you send data to PWSweather.com).  And if you want to display data from other personal weather stations you can (with their permission).
« Last Edit: May 14, 2010, 01:14:43 AM by weatherforyou » Logged

Joe Torsitano

BfdWx
Senior Contributor
****
Offline Offline

Posts: 193



WWW
« Reply #2 on: May 14, 2010, 09:11:02 AM »

This is what I use...

Code:
  <table width="700" border="1" align="center" cellpadding="1" cellspacing="1" style="text-align: center;">
      <tr class="table-top">
        <td align="center">Find your Local National Weather Service forecast by &quot;City, St&quot; or Zip Code</td>
      </tr>
      <tr align="center">
        <td class="searchinput"><div id="Layer2" style="Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 200px; POSITION: absolute; HEIGHT: 115px"> Search by city or zip code. Press enter or select the go button to submit request </div>
            <form method="post" action="http://www.srh.noaa.gov/zipcity.php">
              <input name="inputstring" size="30" value="City, State or Zip Code" onfocus="this.value='';" />
              <input type="submit" name="Go2" value="Go" />
          </form></td>
      </tr>
    </table>

Jack
Logged

prvrt
Contributor
***
Offline Offline

Posts: 116


WL7COQ


WWW
« Reply #3 on: May 14, 2010, 10:44:33 AM »

That is what I was looking for, to a point. Works ok, but it takes the user to the NWS instead of staying on my website. I think it is possible to enter the zipcode and then have the user inputed zip code forecast to be parsed like the local forecast and then be dispayed on my website instead of leaving to the NWS. This may be something for Ken to figure out. Basically I think I would need a second advforecast.php page that could take the user zip code, fetch the forecast and parse it.
Logged

Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
2-Panasonic BL-C131A Cameras
Blackfoot, Idaho
weatherforyou
Forecaster
*****
Offline Offline

Posts: 461


My weather is on WeatherForYou.com. Is yours?


WWW
« Reply #4 on: May 14, 2010, 12:54:29 PM »

I think it is possible to enter the zipcode and then have the user inputed zip code forecast to be parsed like the local forecast and then be dispayed on my website instead of leaving to the NWS
That's what HAMweather does.  You can customize the output to exactly match your web site's look just by modifying a few templates.  Plus it displays watches/warnings, radar, area forecast discussions and more... all based on the zip code a person enters.
Logged

Joe Torsitano

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.105 seconds with 19 queries.
anything