News Feed
Sections




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

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


blog comments powered by Disqus

Similar Posts

PHPit.net: Using the CURL Library on PHP

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 10)

Developer Tutorials: Drupal CMS e-Commerce Module Basics

IBM developerWorks: Java and PHP technology on AIX - Integrate the Java business application w/ DB2

Federico Cargnelutti's Blog: Implementing Dynamic Finders and Parsing Method Expressions


Community Events





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


introduction version tool podcast package release voicesoftheelephpant series composer interview laravel library symfony framework security language community mvc opinion update

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