<?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="https://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/feed" rel="self" type="application/rss+xml" />
	<link>https://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature</link>
	<description>Web Programming, Linux System Administation, and Entrepreneurship in Athens Georgia</description>
	<lastBuildDate>Mon, 04 Jan 2010 08:11:01 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>
		By: az		</title>
		<link>https://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1663</link>

		<dc:creator><![CDATA[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><![CDATA[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>https://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1652</link>

		<dc:creator><![CDATA[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><![CDATA[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>https://www.brandonchecketts.com/archives/mrtg-script-to-graph-the-current-outdoor-temperature/comment-page-1#comment-1651</link>

		<dc:creator><![CDATA[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><![CDATA[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
&#060;?php

$zipcode = $argv[1];
$page = file_get_contents(&quot;https://www.wunderground.com/cgi-bin/findweather/getForecast?query=$zipcode&#038;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;;

?&#062;
&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 🙂  Below is what I was attempting to do, and I get output.  The problem is that the output is &#8220;1&#8221; 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("https://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>
