News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Incorporate Weather Data into Your PHP Web Apps
September 28, 2011 @ 13:44:29

On PHPBuilder.com today there's a new tutorial helping you integrate weather data into your site with the help of the Services_Weather PEAR package.

Regardless of whether you consider the weather to be an obsession or nuisance, there are plenty of opportunities to incorporate weather-related data into your Web application. The Services_Weather PEAR Package offers what is perhaps the easiest way to begin retrieving weather-related data.

Included in the post are the commands you'll need to get the package installed (via the PEAR installer) and sample code to set up the connection - in this case to Weather.com - to fetch the results for a search location. The "search" method will return the best guesses for your input and give you the unique code to use for fetching other values, like the current forecast.

0 comments voice your opinion now!
weather data tutorial pear package servicesweather


Sudheer Satyanarayana's Blog:
A Bit Of XML, RSS And CURL In 7 Lines Of PHP And A Useful Program
April 02, 2010 @ 11:27:47

In a new blog post today Sudheer Satyanarayana shows how to take a few simple lines of code (seven to be exact) and create a simple XML/RSS reader he used to pull in weather data for a simple application.

Today, I was looking for a quick way to get the current weather information on my computer. There are so many websites out there that offer the information. But I was looking for a program I could permanently install on my computer and launch it whenever I want to lookup the weather information. [...] I wrote a program to print the weather information in 7 lines of PHP code. I have published this program on Code Album github repository. You can grab it and use it.

He chose a Yahoo feed to get the weather information from their service. He includes the base code to make the request via a cURL connection and parsing it into a SimpleXML object to pull out the needed info.

0 comments voice your opinion now!
xml rss curl tutorial weather


Komunitasweb.com:
Showing the weather with PHP and Google Weather API
September 11, 2009 @ 09:47:21

On the Komunitasweb.com blog there's a recent post walking you through the steps to add the Google weather content to your site, complete with icons.

If you need to show weather in your website, you can use weather widget such as weatherbug. It's nice and simple, but maybe you need something more integrated with your website. So, take a look at Google Weather API.

They use a SimpleXML object to pull in the XML data from Google's backend (as called via a URL) and loop through the resulting objects to output temperature, current conditions and several days of the forecast.

1 comment voice your opinion now!
weather tutorial google simplexml api


CSS-Tricks.com:
Using Weather Data to Change Your Website's Appearance through PHP and CSS
February 18, 2009 @ 12:08:03

On the CSS-Tricks.com site today there's a quick tutorial on changing up the look and feel of your site based on an external source. More specifically, they give the example of updating the graphics of your site depending on the weather in your area via PHP and CSS.

Using a little magic and trickery (read: PHP and CSS), we can change the appearance of a website automatically based on the weather outside, in real time! In the example site we have created, the header graphic will change to one of four different styles based on Sunny, Rain, Snow, and Cloudy.

Their example makes a request to the Yahoo! weather data for a location and brings it in to PHP where the XML is parsed (via a regular expression) and the current conditions are parsed out. This condition is then passed out into the page as the class type on the header and, based on the CSS already defined, the correct image is pulled in as the background.

0 comments voice your opinion now!
weather data yahoo change header css graphic external source


Stoyan Stefanov's Blog:
Really simple Really Simple Syndication syndication
June 07, 2007 @ 07:06:07

On PHPied.com, Stoyan Stefanov shows how, via a simple bit of code (using some SimpleXML) he replaced the javascript widgets he was previously using for weather information.

So it was time for a change, since those buttons were generated by some javascripts, hosted by theweathernetwork, which is kind of a web 1.0 way of sharing content. In the days of APIs and stuff, this is a shame.

He dropped theweathernetwork.com's information and went for something a little more API-friendly - the weather feeds that Yahoo! offers. Once he figured out the right URL parameter to pass for the cities, it was just a matter of whipping up a 30 line script (using SimpleXML) to grab the weather information for the city and echo out the data.

0 comments voice your opinion now!
syndication simple simplexml feed yahoo weather syndication simple simplexml feed yahoo weather


Community News:
Web APIs with PHP Book Released
August 28, 2006 @ 13:13:00

It's the book everyone's talking about and the entire PHP community should by! Okay, really, there's a few blog posts about it, but it's definitely not one to pass up if you need a quality recource on using web APIs in PHP - Paul Reinheimer's "Professional Web APIs with PHP: eBay, Google, Paypal, Amazon, FedEx plus Web Feeds".

Chris Shiflett comments on his blog that, though he hasn't read it yet:

I know Paul has been working on it for well over a year, and it has already received a positive review from Nathan Smith.

The review gives praise to the book, noting that it provides good examples and helpful tutorials for each of the APIs talked about. The book covers its subject well without trying to "spread itself too thin" by including too much and not focusing on its core - APIs like eBay, Google, FedEx, Flickr, even the National Weather Service.

Even Paul himself comments on the occasion, mentioning what his intentions for the book were and how it changed along the way.

0 comments voice your opinion now!
book release web api google ebay weather flicker review book release web api google ebay weather flicker review



Community Events





Don't see your event here?
Let us know!


laravel language release package opinion api list install library podcast symfony community series voicesoftheelephpant interview deployment bugfix tips introduction framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework