Blogs

Displaying weather XML from NOAA using PHP and XSLT

NOAA now has XML feeds with weather forecasts based upon your latitude and longitude—allowing you to get a forecast much closer to your house if you wish. The URL is http://forecast. weather.gov/MapClick.php?lat=38.86059&lon=-121.491393&FcstType=dwml, where you substitute your own latitude and longitude for those in the example.

Simple Accessible CAPTCHA in PHP

In just a few lines of PHP code, this CAPTCHA will allow you to block most spambots. I developed this after some spammers discovered this web site’s contact form. There already were protections to avoid certain exploits (e. g., hijacking the form to send spam to third parties), but they still were able to send me spam emails.

Some basic Drupal 7 modules

I have just started working with Drupal 7. It is a great content management system but its modularity (and anarchic module development ) means that you have to browse through the many modules to find the ones suited for constructing your site. Here are a few that probably every site could use. Some of these modules are less than intuitive to install (e. g., CKEditor, Superfish), so read the installation instructions carefully.

Logging router events on an Ubuntu server, and checking with Logwatch

Getting all the pieces working was complicated. There are four different things to set up:

  1. The router needs to forward the log to the syslog server — this is router-dependent so not described here
  2. The Linux server needs to accept the logs
  3. Logwatch needs to know what to do with the logs
  4. Logrotate needs to know what to do

Accepting the logs

Pages

Subscribe to RSS - blogs