October 2009

Reading data from a uLog logger, saving to a file

Here’s a Processing sketch that takes data from Sparkfun’s uLog datalogger via a serial port, and saves the results to a file. To use this, you’ll need:

Continue Reading »

Processing
circuits

Permalink

Simple Client URL example in PHP

Here’s a simple example of using the cURL program through PHP’s client URL library. It’s a really powerful way to use HTTP, because you can set just about every HTTP option using the library.

Continue Reading »

PHP

Permalink

Mail form in PHP

Here’s a simple HTML/PHP form that takes data from the form and sends it in mail via HTTP POST. Save it as formToMe.php:

Continue Reading »

PHP

Permalink

Traceroute scraper in Processing

There are many web-based interfaces to traceroute available, including a nice list at traceroute.org.  Here’s a Processing sketch that retrieves the raw HTML from one of them and separates the traceroute lines into time taken, hop IP, and hop name.

This sketch can be modified to scrape other web-based traceroute apps, but you’d need to change the last two methods, parseHop() and printHopList(), depending on how your particular app formats the results. You’d also need to change the global variables at the top that pertain to the site being used.

One caveat: the traceroute takes some time.

To see the full output of the HTML call, change debug to true.

Continue Reading »

Processing

Permalink