<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: MRTG Script to Graph the Current Outdoor Temperature</title> <atom:link href="http://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/feed" rel="self" type="application/rss+xml" /><link>http://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature</link> <description>Web Programming, Linux System Administation, and other geeky stuff</description> <lastBuildDate>Mon, 01 Mar 2010 02:23:06 -0500</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: az</title><link>http://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1663</link> <dc:creator>az</dc:creator> <pubDate>Mon, 04 Jan 2010 08:11:01 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=367#comment-1663</guid> <description>hi.good day.i am developing a system that has to do with mrtg. the system has log in page and user may enter  and see their mrtg graph.
But i am not sure how to create the graph.
Could u help me to sort out this thing.
thank you.</description> <content:encoded><![CDATA[<p>hi.good day.i am developing a system that has to do with mrtg. the system has log in page and user may enter  and see their mrtg graph.<br
/> But i am not sure how to create the graph.<br
/> Could u help me to sort out this thing.<br
/> thank you.</p> ]]></content:encoded> </item> <item><title>By: calivw78</title><link>http://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1652</link> <dc:creator>calivw78</dc:creator> <pubDate>Thu, 03 Dec 2009 14:15:15 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=367#comment-1652</guid> <description>Also, I would like it to display negative values if they are present.  I tried stripping out some of the  code here and there without luck.</description> <content:encoded><![CDATA[<p>Also, I would like it to display negative values if they are present.  I tried stripping out some of the  code here and there without luck.</p> ]]></content:encoded> </item> <item><title>By: calivw78</title><link>http://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1651</link> <dc:creator>calivw78</dc:creator> <pubDate>Thu, 03 Dec 2009 10:01:41 +0000</pubDate> <guid
isPermaLink="false">http://www.brandonchecketts.com/?p=367#comment-1651</guid> <description>Exactly what I needed, thanks. I&#039;m not the best at scripting though, so when I adjusted to make a second graph for gathering pressure and humidity, I failed brilliantly :)  Below is what I was attempting to do, and I get output.  The problem is that the output is &quot;1&quot; off, meaning that instead of grabbing the humidity, it grabs the value listed below it on the web page, like visibility. Any tips?  Thanks again.&lt;code&gt;
#!/usr/bin/php
&lt;?php$zipcode = $argv[1];
$page = file_get_contents(&quot;http://www.wunderground.com/cgi-bin/findweather/getForecast?query=$zipcode&amp;wuSelect=WEATHER&quot;);if (preg_match(&#039;#Humidity:.*?([0-9\.]+)#s&#039;, $page, $matches)) {
$humidity = $matches[1];
}if (preg_match(&#039;#Pressure:.*?([0-9\.]+)#s&#039;, $page, $matches)) {
$pressure = $matches[1];
}echo &quot;$humidity\n$pressure\n\n&quot;;?&gt;
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Exactly what I needed, thanks. I&#8217;m not the best at scripting though, so when I adjusted to make a second graph for gathering pressure and humidity, I failed brilliantly <img
src='http://www.brandonchecketts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Below is what I was attempting to do, and I get output.  The problem is that the output is &#8220;1&#8243; off, meaning that instead of grabbing the humidity, it grabs the value listed below it on the web page, like visibility. Any tips?  Thanks again.</p><p><code><br
/> #!/usr/bin/php<br
/> &lt;?php</p><p>$zipcode = $argv[1];<br
/> $page = file_get_contents("http://www.wunderground.com/cgi-bin/findweather/getForecast?query=$zipcode&amp;wuSelect=WEATHER");</p><p>if (preg_match('#Humidity:.*?([0-9\.]+)#s', $page, $matches)) {<br
/> $humidity = $matches[1];<br
/> }</p><p>if (preg_match('#Pressure:.*?([0-9\.]+)#s', $page, $matches)) {<br
/> $pressure = $matches[1];<br
/> }</p><p>echo "$humidity\n$pressure\n\n";</p><p>?&gt;<br
/> </code></p> ]]></content:encoded> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 7/11 queries in 0.007 seconds using disk

Served from: bookscouter.com @ 2010-03-21 22:33:10 -->