<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>huanix &#187; C programming</title>
	<atom:link href="http://www.huanix.com/category/c-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.huanix.com</link>
	<description>chown -R huanix /</description>
	<lastBuildDate>Sat, 31 Dec 2011 14:53:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>creating web pages in c</title>
		<link>http://www.huanix.com/2007/05/20/creating-web-pages-in-c/</link>
		<comments>http://www.huanix.com/2007/05/20/creating-web-pages-in-c/#comments</comments>
		<pubDate>Mon, 21 May 2007 02:10:27 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.huanix.com/2007/05/20/creating-web-pages-in-c/</guid>
		<description><![CDATA[I wrote my first cgi script today.. it actually sounds pretty juvenile now that i say it out loud. here it is&#8230; ( i really need to read the geshi docs so i can format this properly!) #include int main(){ std::cout &#60;&#60;"Content-Type: text/html&#60;html&#62;\n\n "; std::cout &#60;&#60; "text."; std::cout &#60;&#60; "&#60;/html&#62;"; return 0; } Anyway, it [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote my first cgi script today.. it actually sounds pretty juvenile now that i say it out loud.</p>
<p>here it is&#8230; ( i really need to read the geshi docs so i can format this properly!)</p>
<p><code language="cpp"><br />
#include <iostream></iostream><br />
int main(){<br />
std::cout &lt;&lt;"Content-Type: text/html&lt;html&gt;\n\n  ";<br />
std::cout &lt;&lt; "text.";<br />
std::cout &lt;&lt; "&lt;/html&gt;";<br />
return 0;<br />
}</code></p>
<p>Anyway, it compiled pretty easily as a cgi script; getting it to run in apache took me a few minutes, as a matter of fact, i am afraid i hosed some stuff on this test system trying to get it working. I finally added<br />
<code language="html"><br />
Options +ExecCGI<br />
</code><br />
to the apache2 config file &#8212; in ubuntu, i actually modified the /etc/apache2/sites-available/default file, under the Directory /var/www tag.</p>
<p>This allowed me to run the cgi.. at least.. i tried 84 things, so I -think- that&#8217;s what finally worked <img src='http://www.huanix.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>tomorrow i&#8217;d like to try some post/get forms with c++, i write my forms with so much php that i&#8217;m not sure how i&#8217;ll do it with c.</p>
<p>btw &#8211; thanks to <a href="http://www.metalshell.com/view/source/127/">http://www.metalshell.com/view/source/127/</a> for the idea.</p>
<p><a href="http://www.huanix.com/wp-content/uploads/2007/05/text.png" title="a snapshot of the text site"><img src="http://www.huanix.com/wp-content/uploads/2007/05/text.thumbnail.png" alt="a snapshot of the text site" /></a><a href="http://www.huanix.com/wp-content/uploads/2007/05/sites-available.png" title="a snapshot of my /etc/apache2/sites-available/default file"><img src="http://www.huanix.com/wp-content/uploads/2007/05/sites-available.thumbnail.png" alt="a snapshot of my /etc/apache2/sites-available/default file" /></a><a href="http://www.huanix.com/wp-content/uploads/2007/05/sites-available.png" title="a snapshot of my /etc/apache2/sites-available/default file"> </a></p>
<p><a href="http://www.huanix.com/wp-content/uploads/2007/05/sites-available.png" title="a snapshot of my /etc/apache2/sites-available/default file"> </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2007/05/20/creating-web-pages-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stat Tracker and Learning C with Emacs</title>
		<link>http://www.huanix.com/2006/11/23/stat-tracker-and-learning-c-with-emacs/</link>
		<comments>http://www.huanix.com/2006/11/23/stat-tracker-and-learning-c-with-emacs/#comments</comments>
		<pubDate>Fri, 24 Nov 2006 05:52:56 +0000</pubDate>
		<dc:creator>huanix</dc:creator>
				<category><![CDATA[Apache2]]></category>
		<category><![CDATA[C programming]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[stat tracker]]></category>

		<guid isPermaLink="false">http://www.huanix.com/?p=8</guid>
		<description><![CDATA[I am sorry that I never resolved the Server Side Include with Apache2 yesterday. I moved on to write a php include that I could add to the header of each file. I initially had trouble because I&#8217;m currently hosting 5 sites, and using the $_SERVER['PHP_SELF'] element, many of the inserts would appear as &#8220;index.php&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>I am sorry that I never resolved the Server Side Include with Apache2 yesterday. I moved on to write a php include that I could add to the header of each file. I initially had trouble because I&#8217;m currently hosting 5 sites, and using the $_SERVER['PHP_SELF'] element, many of the inserts would appear as &#8220;index.php&#8221; without telling me which domain they were associated with. I was foolish enough to try some superceding directories, like</p>
<blockquote><p>&#8220;/../&#8221; . $_SERVER['PHP_SELF']</p></blockquote>
<p>which would return (predictably) &#8220;/../index.php&#8221;. So I eventually got the bright idea that there MUST be an array element in PHP to address this &#8211; and I lucked out! I used</p>
<blockquote><p>$_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];</p></blockquote>
<p>and got neat results like &#8220;www.sl7pm.com/index.php&#8221; which is EXACTLY what I wanted to see! now I can tell the difference between hits to www.sl7pm.com/index.php and www.huanix.com/index.php, which previously looked the same.</p>
<p>I will continue to work on the Server Side Include issue when I get more steam. I hate planting the same repetitive include in every file, especially when I know that I will forget where I placed in in highly-included software like phpBB and WordPress.</p>
<p>I have been thinking about taking a programming class through my local university.. I know a little, but I feel like a formal class would help me build a firm foundation. I&#8217;m looking at taking Programming I. Any feedback would be appreciated. I am currently MOST proficient with PHP, which isn&#8217;t much, but I am picking up a lot of fundamentals like arrays, switch &#038; case, and loops that I know are ubiquitous in programming.</p>
<h4>Incoming search terms:</h4><ul><li>programming stat tracker</li><li>stats tracker c</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.huanix.com/2006/11/23/stat-tracker-and-learning-c-with-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

