<?xml version="1.0" encoding="windows-1252"?>
<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>The Blogging Protagonist &#187; My Website</title>
	<atom:link href="http://www.SWHarden.com/blog/category/my-website/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.SWHarden.com/blog</link>
	<description>A collection of thoughts in technological degradation</description>
	<lastBuildDate>Wed, 12 Oct 2011 02:20:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Generate Apache-Style HTTP Access Logs via SQL and PHP</title>
		<link>http://www.SWHarden.com/blog/2009-08-04-generate-apache-style-http-access-logs-via-sql-and-php/</link>
		<comments>http://www.SWHarden.com/blog/2009-08-04-generate-apache-style-http-access-logs-via-sql-and-php/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 05:11:18 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Website]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1364</guid>
		<description><![CDATA[Does your web hosting company block access to access.log, the text file containing raw website log files?  If so, you&#8217;re like me, and it sucks.  There&#8217;s a plethora of gorgeous and extremely insightful website traffic analyzers, but all of them require access to raw HTTP access logs.  Today I propose a semi-efficient [...]]]></description>
			<content:encoded><![CDATA[<p><b>Does your web hosting company block access to access.log, the text file containing raw website log files?</b>  If so, you&#8217;re like me, and it sucks.  There&#8217;s a plethora of gorgeous and extremely insightful website traffic analyzers, but all of them require access to raw HTTP access logs.  Today I propose a semi-efficient way to generate such logs utilizing PHP to determine page load data (time, user IP, requested page, referring page, user client, etc) and SQL to save such data for easy retrieval later.  Note that this method is a HUGE improvement of my previous project which <a href="http://www.swharden.com/blog/2009-01-22-using-php-to-create-apache-style-accesslog/" >used PHP scripts to store HTTP access logs as flat files</a>.  Although it worked in theory, in all practicality the process of opening, writing to, and closing a text file (which grew a few MB a week) was too cumbersome for my server to comfortable handle.  The method described on this page utilizes <a href="http://en.wikipedia.org/wiki/SQL" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">SQL</a>, a database engine well-suited to meet these exact demands.  When we&#8217;re done, you&#8217;ll be able to use a web interface to view your access log (pictured, converting long, complicated search queries to web search and image search strings automatically), or have the option to export it directly to an access.log text file in a standard Apache-style format.<br />
<a href="http://www.SWHarden.com/blog/images/sql_php_http_log_viewer.jpg" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/sql_php_http_log_viewer-525x339.jpg" alt="sql_php_http_log_viewer" title="sql_php_http_log_viewer" width="525" height="339" class="aligncenter size-medium wp-image-1367" /></a></p>
<p><b>First, make sure your database is structured appropriately.</b>  This page is written for those with a working knowledge of PHP and SQL, but if you&#8217;re new to the field I encourage you to learn!  <a href="http://www.w3schools.com/" onclick="javascript:urchinTracker ('/outbound/article/www.w3schools.com');">W3Schools.com</a> is an awesome resource to rapidly learn new languages.  Also, when starting-out with SQL (like me), <a href="http://www.phpmyadmin.net/home_page/index.php" onclick="javascript:urchinTracker ('/outbound/article/www.phpmyadmin.net');">phpMyAdmin</a> is a awesome. The code, as it&#8217;s currently written (below) is designed to store data in the &#8220;nibjb&#8221; database under the &#8220;logs&#8221; table.  Briefly, it uses PHP to determine user data (time, ip, requested page, etc.) and injects this information into the SQL database.  In fact, it&#8217;s doing it to you right now!  Don&#8217;t believe me?  View the source of this web page and scroll to the bottom.  BAM!  There you are. </p>
<pre class="prettyprint python">
// logme.php
&lt;?php

if ( !isset($wp_did_header) ) {
	$wp_did_header = true;
	require_once( '/home/content/n/i/b/nibjb/html/blog/wp-load.php' );
	//wp();
	//require_once( '/home/content/n/i/b/nibjb/html/blog/wp-includes/template-loader.php' );
}

function logwriter_handlevar($varname,$defaultvalue){
    $tempvar = getenv($varname);
    if(!empty($tempvar)) {
        return $tempvar;
    } else {
        return $defaultvalue;
    }
} 

if (!empty($REMOTE_HOST)) {
$logwriter_remote_vistor = $REMOTE_HOST;
}else{
$logwriter_remote_vistor = logwriter_handlevar("REMOTE_ADDR","-");
} 

$logwriter_remote_ident = logwriter_handlevar("REMOTE_IDENT","-");
$logwriter_remote_user = logwriter_handlevar("REMOTE_USER","-");
$logwriter_date = date("d/M/Y:H:i:s");
$logwriter_request_method = logwriter_handlevar("REQUEST_METHOD","GET");
$logwriter_request_uri = logwriter_handlevar("REQUEST_URI","");
$logwriter_server_protocol = logwriter_handlevar("SERVER_PROTOCOL","HTTP/1.1");
$logwriter_http_referer = logwriter_handlevar("HTTP_REFERER","-");
$logwriter_http_user_agent = logwriter_handlevar("HTTP_USER_AGENT","");
$logwriter_logstring = "$logwriter_remote_vistor $logwriter_remote_ident $logwriter_remote_user [$logwriter_date $logwriter_timezone] \"$logwriter_request_method $logwriter_request_uri $logwriter_server_protocol\" 200 - \"$logwriter_http_referer\" \"$logwriter_http_user_agent\"\n";
?&gt;

&lt;?php
$username="YOUR_USERNAME";
$password="YOUR_PASSWORD";
$database="nibjb";
mysql_connect('mysql157.secureserver.net',$username,$password);
//mysql_connect(localhost,$username,$password);

$query = "INSERT INTO logs VALUES ('','$logwriter_date','$logwriter_remote_vistor','$logwriter_request_method','$logwriter_request_uri','$logwriter_server_protocol','$logwriter_http_referer','$logwriter_http_user_agent')";
mysql_query($query);
mysql_close();
?&gt;

&lt;!--
LOG DETAILS:
time: &lt;?php echo($logwriter_date); ?&gt;
vistor: &lt;?php echo($logwriter_remote_vistor); ?&gt;
method: &lt;?php echo($logwriter_request_method); ?&gt;
request: &lt;?php echo($logwriter_request_uri); ?&gt;
protocol: &lt;?php echo($logwriter_server_protocol); ?&gt;
referrer: &lt;?php echo($logwriter_http_referer); ?&gt;
agent: &lt;?php echo($logwriter_http_user_agent); ?&gt;
HTML LOG LINE:
&lt;?php echo($logwriter_logstring); ?&gt;
 --&gt;
</pre>
<p><b>All right, that was easy.</b> Every time we load logme.php, it adds the data to the SQL database. To add data every time you go to a particular web page, you could use a PHP include() statement in each webpage, or you could take advantage of the PHP&#8217;s auto_append_file feature!  Simply insert the following line into your php.ini file if you have access to yours:</p>
<pre class="prettyprint php">
auto_append_file = "/path/to/html/logme.php"
</pre>
<p><b>How do we access this data once it&#8217;s been loaded into the database?</b> There are many different ways, but I&#8217;ve chosen to get a little creative with a sleek, yet minimalistic web-based fronted.  It basically just shows the last [x] number of entries in the access log.  You can adjust the number of entries displayed by slapping on some arguments to the URL, transforming viewLast.php into viewLast.php?limit=123 or something (see the screenshot above).  I won&#8217;t discuss the details of this script.  It&#8217;s self-explanatory.  </p>
<pre class="prettyprint php">
// viewLast.php
&lt;html&gt;
&lt;head&gt;
&lt;style type="text/css"&gt;
td {
font-family: verdana, arial;
font-size:10px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php

$limit = (int)$_GET['limit'];
if ($limit===0) {$limit=25;}

$username="YOUR_USERNAME";
$password="YOUR_PASSWORD";
$database="nibjb";
mysql_connect('mysql157.secureserver.net',$username,$password);
mysql_select_db($database) or die( "Unable to select database");
$query="
SELECT * FROM logs WHERE
request NOT LIKE \"%testlog.php%\"
AND request NOT LIKE  \"%/logs/%\"
AND request NOT LIKE \"%/wp-admin/%\"
ORDER BY ID DESC LIMIT 0,$limit
";
//$query="SELECT * FROM logs WHERE referrer LIKE \"%&#038;q=%\" or referrer LIKE \"%&#038;prev=%\" ";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?&gt;

&lt;b&gt;&lt;?php echo($query); ?&gt;&lt;/b&gt;
&lt;table border="1"&gt;
&lt;tr&gt;
&lt;td&gt;id&lt;/td&gt;
&lt;td&gt;time&lt;/td&gt;
&lt;td&gt;visitor&lt;/td&gt;
&lt;td&gt;request&lt;/td&gt;
&lt;td&gt;referrer&lt;/td&gt;
&lt;/tr&gt;

&lt;?php
$i=1;
while ($i&lt;$num) {
$id=mysql_result($result,$i,"id");
$time=mysql_result($result,$i,"time");
$visitor=mysql_result($result,$i,"visitor");
$method=mysql_result($result,$i,"method");
$request=mysql_result($result,$i,"request");
$protocol=mysql_result($result,$i,"protocol");
$referrer=mysql_result($result,$i,"referrer");
$referrer2=str_replace("&#038;", "&#038; ", $referrer);
$agent=mysql_result($result,$i,"agent");
$searchWords="";
$searchEngine="";
if (strpos($referrer, "q=")&gt;0 and strpos($referrer, "google")&gt;0) {$searchEngine="Google Web Search: ";}
if (strpos($referrer, "prev=/images")&gt;0 and strpos($referrer, "google")&gt;0) {$searchEngine="Google Image Search: ";}

// SEARCH EXTRACTION //
$j=0;
$rTemp=str_replace("prev=/images%3Fq%3D", "q=", $referrer);
$rTemp=str_replace("?q=","&#038;q=", $rTemp);
$rTemp=str_replace("%2B"," ", $rTemp);
$rTemp=str_replace("%26"," ", $rTemp);
$rTemp=str_replace("%3D"," ", $rTemp);
$rTemp=str_replace("+"," ", $rTemp);
$wvars=split("&#038;",$rTemp);
while ($j&lt;count($wvars)){
	if (substr($wvars[$j],0,2) === "q=") {
		$searchWords = $searchWords . $wvars[$j] . " ";
		}
	$j++;
}

$searchWords=substr($searchWords,strpos($searchWords, "q=")+2);
if (strlen($searchWords)&lt;3) {$searchWords=$referrer;}
////////////////////////

echo "
&lt;tr&gt;
&lt;td&gt;$id&lt;/td&gt;
&lt;td&gt;$time&lt;/td&gt;
&lt;td&gt;$visitor&lt;/td&gt;
&lt;td&gt;&lt;a href='$request'&gt;$request&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$searchEngine &lt;a href='$referrer'&gt;$searchWords&lt;/a&gt;&lt;/td&gt;
&lt;/td&gt;
";
$i++;
}
?&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><b>And you&#8217;re done!</b>  This example is a simplified, bare bones example.  You can take this a long way if you&#8217;d like.  My goal is lite &#038; flexible.  A quick query from <a href="http://www.python.org" onclick="javascript:urchinTracker ('/outbound/article/www.python.org');">Python</a> and <a href="matplotlib.sourceforge.net/">Matplotlib</a> (for example) yields gorgeous visual representations of otherwise-convoluted data!<br />
<a href="http://www.SWHarden.com/blog/images/graph_time.png" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/graph_time-500x200.png" alt="" title="graph_time" width="500" height="200" class="alignnone size-medium wp-image-1007" /></a></p>
<p><b>If you have any questions, or end-up developing something awesome with this code, shoot me an email!</b>  It&#8217;s not luxurious, but this code works for me, and I share it with the best of intentions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.SWHarden.com/blog/2009-08-04-generate-apache-style-http-access-logs-via-sql-and-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Transition</title>
		<link>http://www.SWHarden.com/blog/2009-07-23-transition/</link>
		<comments>http://www.SWHarden.com/blog/2009-07-23-transition/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 02:40:53 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[My Website]]></category>

		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1355</guid>
		<description><![CDATA[I&#8217;m briefly suspending entries on this website.  I currently have no projects I&#8217;m working on, and I&#8217;m going to try to keep it that way for a few weeks.  I really need to re-gear my brain and get ready for dental school next month.  I&#8217;m struggling with a plethora of random emotions, [...]]]></description>
			<content:encoded><![CDATA[<p><b>I&#8217;m briefly suspending entries on this website.</b>  I currently have no projects I&#8217;m working on, and I&#8217;m going to try to keep it that way for a few weeks.  I really need to re-gear my brain and get ready for dental school next month.  I&#8217;m struggling with a plethora of random emotions, and I think the best thing for me is to take it easy for a little bit and try to let go of the things I feel are important to me (projects, electrical, mechanical, computational, painting, or otherwise).  I&#8217;m going to try my best to organize data from my past life (about a decade worth) in an attempt to preserve it.  I&#8217;ve been thrown back into my early teen years by uncovering ~10 GB of music I used to listen to.  Nostalgia?  Yeah, I&#8217;m feeling it.  I had totally forgotten about random, obscure Japanese bands such as <a href="http://en.wikipedia.org/wiki/Rip_Slyme" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">Rip Slyme</a>.  For example, <a href="http://www.youtube.com/watch?v=-JbnsR7V34U" onclick="javascript:urchinTracker ('/outbound/article/www.youtube.com');">Hot Chocolate [a must hear / must see youtube video]</a>. In fact, [youtubes some more], check out this randomness [embeds below].  I love non-mainstream awkwardness.  What&#8217;s that I hear? 8-bit tones?<br />
<object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/xJnz1tvhNwc&#038;hl=en&#038;fs=1&#038;color1=0x006699&#038;color2=0x54abd6&#038;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xJnz1tvhNwc&#038;hl=en&#038;fs=1&#038;color1=0x006699&#038;color2=0x54abd6&#038;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.SWHarden.com/blog/2009-07-23-transition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Textile From Wordpress</title>
		<link>http://www.SWHarden.com/blog/2009-05-15-removing-textile-from-wordpress/</link>
		<comments>http://www.SWHarden.com/blog/2009-05-15-removing-textile-from-wordpress/#comments</comments>
		<pubDate>Fri, 15 May 2009 22:56:32 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Website]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1045</guid>
		<description><![CDATA[I realized that the C code from yesterday wasn&#8217;t showing-up properly because of textile, a rapid, inline, tag-based formatting system.  The app converted blog code from ["text":http://www.SWHarden.com/ *like* _this_]  to [text like this. ] While it&#8217;s fun and convenient to use, it&#8217;s not always practical.  The problem I was having was that [...]]]></description>
			<content:encoded><![CDATA[<p><b>I realized that the C code from yesterday wasn&#8217;t showing-up properly</b> because of <a href="http://wordpress.org/tags/textile" onclick="javascript:urchinTracker ('/outbound/article/wordpress.org');">textile</a>, a rapid, inline, tag-based formatting system.  The app converted blog code from ["text":http://www.SWHarden.com/ *like* _this_]  to [<a href="http://www.SWHarden.com" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');">text</a> <b>like</b> <i>this</i>. ] While it&#8217;s fun and convenient to use, it&#8217;s not always practical.  The problem I was having was that in C code, variable names (such as _delay_) were becoming irrevocably italicized, and nothing I did could prevent textile from ignoring code while styling text.  The kicker is that I couldn&#8217;t disable it easily, because I&#8217;ve been writing in this style for <b>over four years!</b>  I decided that the time was now to put my mad Python skills to the test and write code to handle the conversion from textile-format to raw HTML.<br />
<b>I accomplished this feat</b> in a number of steps.  Yeah, I could have done hours of research to find a &#8220;faster way&#8221;, but it simply wouldn&#8217;t have been as creative.  In a nutshell, I backed-up the SQL database using <a href="http://en.wikipedia.org/wiki/PhpMyAdmin" onclick="javascript:urchinTracker ('/outbound/article/en.wikipedia.org');">PHPMyAdmin</a> to a single &#8220;x.sql&#8221; file.  I then wrote a pythons script to parse this [massive] file and output &#8220;o.sql&#8221;, the same data but with all of the textile tags I commonly used replaced by their HTML equivalent.  It&#8217;s not 100% perfect, but it&#8217;s 99.999% perfect.  I&#8217;ll accept that.  The output?  You&#8217;re viewing it!  Here&#8217;s the code I used to do it:</p>
<pre class="prettyprint python">
## This Python (1.0) script removes *SOME* textile formatting from Wordpress
## backups in plain text SQL format (dumped from PHP MyAdmin). Specifically,
## it corrects bold and itallic fonts and corrects links. It should be easy
## to expand if you need to do something else with it.
## Enjoy! --Scott Harden (www.SWHarden.com)

infile = 'x.sql' # &lt; &lt; THIS IS THE INPUT FILE NAME!

replacements=   ["\r"," "],["\n"," \n "],["*:","* :"],["_:","_ :"],
                ["\n","&lt;br&gt;\n"],["&gt;*","&gt; *"],["*&lt; ","* &lt;"],
                ["&gt;_","&gt; _"],["_&lt; ","_ &lt;"],
                [" *"," &lt;b&gt;"],["* "," "],[" _"," &lt;i&gt;"],["_ ","&lt;/i&gt; "]
                #These are the easy replacements

def fixLinks(line):
    ## replace ["links":URL] with [&lt;a href="URL"&gt;links&lt;/a&gt;]. ##
    words = line.split(" ")
    for i in range(len(words)):
        word = words[i]
        if '":' in word:
            upto=1
            while (word.count('"')&amp;lt;2):
                word = words[i-upto]+" "+word
                upto+=1
            word_orig = word
            extra=""
            word = word.split('":')
            word[0]=word[0][1:]
            for char in ".),'":
                if word[1][-1]==char: extra=char
            if len(extra)&gt;0: word[1]=word[1][:-1]
            word_new='&lt;a href="%s"&gt;%s&lt;/a&gt;'%(word[1],word[0])+extra
            line=line.replace(word_orig,word_new)
    return line

def stripTextile(orig):
    ## Handle the replacements and link fixing for each line. ##
    if not orig.count("', '") == 13: return orig #non-normal post
    line=orig
    temp = line.split
    line = line.split("', '",5)[2]
    if len(line)&amp;lt;10:return orig #non-normal post
    origline = line
    line = " "+line
    for replacement in replacements:
        line = line.replace(replacement[0],replacement[1])
    line=fixLinks(line)
    line = orig.replace(origline,line)
    return line

f=open(infile)
raw=f.readlines()
f.close
posts=0
for raw_i in range(len(raw)):
    if raw[raw_i][:11]=="INSERT INTO":
        if "wp_posts" in raw[raw_i]: #if it's a post, handle it!
            posts+=1
            print "on post",posts
            raw[raw_i]=stripTextile(raw[raw_i])

print "WRITING..."
out = ""
for line in raw:
    out+=line
f=open('o.sql','w')
f.write(out)
f.close()
</pre>
<p><b>I certainly held my breath while the thing ran.</b>  As I previously mentioned, this thing modified SQL tables.  Therefore, when I uploaded the &#8220;corrected&#8221; versions, I kept breaking the site until  I got all the bugs worked out.  Here&#8217;s an image from earlier today when my site was totally dead (0 blog posts)</p>
<p><a href="http://www.SWHarden.com/blog/images/hostingwork.jpg" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/hostingwork-500x400.jpg" alt="hostingwork" title="hostingwork" width="500" height="400" class="aligncenter size-medium wp-image-1052" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.SWHarden.com/blog/2009-05-15-removing-textile-from-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP-Generated Access.log is a Success</title>
		<link>http://www.SWHarden.com/blog/2009-05-14-php-generated-accesslog-is-a-success/</link>
		<comments>http://www.SWHarden.com/blog/2009-05-14-php-generated-accesslog-is-a-success/#comments</comments>
		<pubDate>Thu, 14 May 2009 18:33:22 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Website]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=1006</guid>
		<description><![CDATA[
THIS CODE HAS BEEN UPDATED!
THIS CODE HAS BEEN UPDATED!
THIS CODE HAS BEEN UPDATED!
>>> CHECK OUT THE NEW CODE < ]]></description>
			<content:encoded><![CDATA[<p><table><tr><td style="text-indent: 25px; background-color: #E5E5E5; padding: 10px; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 7px;border-top-style: solid; border-right-style: solid;border-bottom-style: solid;border-left-style: solid;border-top-color: #B5B5B5; border-right-color: #B5B5B5;border-bottom-color: #B5B5B5; border-left-color: #B5B5B5;border-right-width: 1px;background-image: url(http://www.swharden.com/graphics/layout_2006_08_12/quotes.jpg); background-position: left top; background-repeat: no-repeat;"><br />
<b>THIS CODE HAS BEEN UPDATED!</b><br />
<b>THIS CODE HAS BEEN UPDATED!</b><br />
<b>THIS CODE HAS BEEN UPDATED!</b></p>
<p>>>> CHECK OUT THE NEW CODE < <<<br />
[<a href="http://www.swharden.com/blog/2009-08-04-generate-apache-style-http-access-logs-via-sql-and-php/">Generate Apache-Style HTTP Access Logs via SQL and PHP]</p>
<p><b>OBSOLETE CODE IS BELOW&#8230;</b><br />
</td></tr></table></p>
<p> <b>A few months ago</b> I wrote about a way <a href="http://www.swharden.com/blog/2009-01-22-using-php-to-create-apache-style-accesslog/" >I use PHP to generate apache-style access.log files</a> since my web host blocks access to them.  Since then I&#8217;ve forgotten it was even running!  I now have some pretty cool-looking graphs generated by <a href="http://www.python.org" onclick="javascript:urchinTracker ('/outbound/article/www.python.org');">Python</a> and <a href="http://matplotlib.sourceforge.net/" onclick="javascript:urchinTracker ('/outbound/article/matplotlib.sourceforge.net');">Matplotlib</a>.  For details (and the messy script) check the original posting.  </p>
<p> <a href="http://www.SWHarden.com/blog/images/graph_time.png" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/graph_time-500x200.png" alt="" title="graph_time" width="500" height="200" class="alignnone size-medium wp-image-1007" /></a>  </p>
<p> <b>This image represents</b> the number of requests (php pages) made per hour since I implemented the script.  It might be a good idea to perform some <a href="http://www.swharden.com/blog/2008-11-17-linear-data-smoothing-in-python/" >linear data smoothing techniques</a> (which I love writing about), but for now I&#8217;ll leave it as it is so it most accurately reflects the actual data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.SWHarden.com/blog/2009-05-14-php-generated-accesslog-is-a-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Google Re-Indexing My Life?</title>
		<link>http://www.SWHarden.com/blog/2009-04-02-is-google-re-indexing-my-life/</link>
		<comments>http://www.SWHarden.com/blog/2009-04-02-is-google-re-indexing-my-life/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 15:26:38 +0000</pubDate>
		<dc:creator>Scott</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[My Website]]></category>

		<guid isPermaLink="false">http://www.SWHarden.com/blog/?p=870</guid>
		<description><![CDATA[ After several years of persistent writing on this website I was forced (by my undergraduate university&#8217;s difficult course loads) to stop adding to this blog &#8211; something I consider to be one of the most significant projects I&#8217;ve ever worked on, with brain-to-text recordings of my thoughts spanning almost a decade of time.  [...]]]></description>
			<content:encoded><![CDATA[<p> <b>After several years</b> of persistent writing on this website I was forced (by my undergraduate university&#8217;s difficult course loads) to stop adding to this blog &#8211; something I consider to be one of the most significant projects I&#8217;ve ever worked on, with brain-to-text recordings of my thoughts spanning almost a decade of time.  After a few years of suspended writing, Google went from loving me (sending me thousands of pageviews daily) to forgetting about me (nothing. silence. nada.).  Now that my thesis requirements have been completed, I&#8217;m trying to re-energize my writing in an attempt to document the projects I work on which, without this website, would likely be forever forgotten even by me.  It appears that the burst of new writing has regained Google&#8217;s attention.  Google for terms such as &#8220;data smoothing in python&#8221; and it favors my site.  Google is slowly, but surely, re-indexing my pages and assigning them values of relevance which are approaching (but still a tiny fraction of) what they were before my hiatus.  Here&#8217;s a chart from google&#8217;s analytics demonstrating an estimation of IP visits per day (visitors) and their locations.  Do I have fans in South Africa?  I didn&#8217;t know they had computers in South Africa! (I&#8217;m sorry if you are that person in South Africa, and were offended by that statement)  </p>
<p> <a href="http://www.SWHarden.com/blog/images/visitbyday.png" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/visitbyday.png" alt="" title="visitbyday" width="500" height="98" class="alignnone size-full wp-image-871" /></a>  </p>
<p> <a href="http://www.SWHarden.com/blog/images/visitsites.png" onclick="javascript:urchinTracker ('/outbound/article/www.SWHarden.com');"><img src="http://www.SWHarden.com/blog/images/visitsites.png" alt="" title="visitsites" width="500" height="277" class="alignnone size-full wp-image-872" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.SWHarden.com/blog/2009-04-02-is-google-re-indexing-my-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

