First a little background information. I wanted to import an 8 Gig Wikipedia table dump for a project that I was working on. The table was too big to import all of the records on my Linode server. I only needed certain rows and columns, so I tried parsing the dump file in PHP. This worked, but it was much too slow. So then I went looking for text processor programs. This turned up awk, grep, lex and sed. awk, grep and sed are all line based processors. These would not work because the dump file has multiple database records per line. That left lex and its successor flex.
Continue reading Mysqldump to TSV Conversion Using Flex
Adventures with ModSecurity
I saw a reference to ModSecurity while reading the following article on Slashdot: Writing Hardened Web Applications?. It is an Apache web server firewall module that is designed to look for and reject malicious access attempts. What follows are the trials and tribulations of installing it on debian.
Continue reading Adventures with ModSecurity
HTML 5 Species Taxon Microdata Using Darwin Core
I just added HTML 5 species taxon microdata to worldspecies.org. This provides machine readable data for certain properties of a species. ie. Taxonomy, common names, synonyms. The data is embedded in the HTML and is tagged as property name/value pairs.
An example of the extracted data can be seen using Google's Rich Snippets Testing Tool.
Continue reading HTML 5 Species Taxon Microdata Using Darwin Core
CSS Progress Bar or Gauge
Today I needed a gauge to show where on a scale that a value fell.
I wanted to use CSS instead of dynamically creating an image in PHP or creating 100 static images.
I found some samples that use DIV tags to create a gauge, but I needed to put text both before and after the gauge on the same line.
So I modified the sample Super simple CSS bars.
Continue reading CSS Progress Bar or Gauge
Website Click Tracker Written in PHP
While looking at globalspecies.org's webserver access log, I thought it would be interesting to see how the users were navigating the website. After not finding a free solution written in PHP, I decided to write my own.
Continue reading Website Click Tracker Written in PHP