By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

code to display weather feed based on city entered in textbox

P: 1
Can any one tell me how to display weather of a city enetred using text box in my web site using php like as in
May 15 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 5,821
You could load an RSS feed from Yahoo!:
Expand|Select|Wrap|Line Numbers
  1. $weather = file_get_contents("'feed://' . urlencode($_GET['zip']));
You could then use XML_RSS, or you could parse the output by hand if you wish.
May 16 '07 #2

Post your reply

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