GPRS Munging

Posted from: Macintosh Ti PowerBook, running MacOS X 10.2.3 with Bluetooth (simpler, more integrated than Windows XP) using Optus GPRS (also more and better integrated than Windows XP). Just double-checking that this works. Seems to drop out a little quickly…

In all this talk of 1980s music, I keep forgetting that Crowded House’s Don’t Dream Its Over was released in 1987, therefore making it a 1980s classic. Neil “dontated” the song to the NZ Tourism Board in their advertising campaign for New Zealand. “In 5 days you’ll feel 100%”. Too right!

A-Ha

Just proving my point that the 1980s are cool: Holden are now advertising the Barina with a reworking of the 1983 hit: A-Ha’s Take on Me. Go Morton!

Can the only logical reason be that we teenagers of the 1980s are now cashed up? Are the advertisers purposely trying to use nostalgia to free us of our dollars? Does Adam Sandler’s The Wedding Singer have to answer for this new wave [hehehe], or is it my fault due to the Photoshop 6.0 Roadshow’s “1980s Music Trivia” contest?

If World War II had the same immediacy of media and information flow as we witness today – would there have been any more wars? What is it about human nature that forces people into a “dictatorship” mode and reliance on armed conflict to resolve issues? It also goes to prove the adage from WWII veterans, as reported by Ambrose, that war is hours of boredom interspersed with minutes of sheer terror.

The embedded journalists and the communications infrastructure provides an element of honesty in war. At least with the units that have journalists attached, the ability to commit “war crimes” is diminished. Media at its best.

However, the cost is the lack of “filters” and the great degree of confusion that occurs as differening qualities of information is communicated. For instance, Channel Ten News reported live on TV that Tariq Aziz had defected after the initial bombardment; this was pure rumor and proven wrong very quickly. Confirmation is important. In times like these, some of the media processes are forgotten in the fog of war.

GPRS

Posting this entry via Bluetooth, GPRS. Wireless, Baby. Yeah!

GPRS connection setup time is really quick; there is no overhead of normal modems (handshaking) – but its still a little slower than ISDN setup time. It feels about as fast as a 56K modem connection, so its still not super-fast, but much more acceptable than the 9.6Kb you normally get with the data-over-voice cellular style connection. With my Bluetooth adaptor, the connection between the laptop and the phone is wireless. It creates a virtual COM port you address like a normal modem, and works without the directionality of IrDA. The plan I am on from Optus is 1c per KB (that’s a Kilobyte). There are other plans, and I’ll feel out my usage. The idea is to use it minimally and just to stay in contact.

Once you have connected, you have essentially a TCP/IP pipe – just like an Ethernet/Cable Modem/PPP style connection. VPN, email etc all work just like a normal dialup connection. Albeit a little more expensive.

AI

Saw AI Artificial Intelligence for the first time last night. What an intensely moving and thought provoking film. As a fan of ‘hard science fiction’: my saying is that the sadest thing about dying is that you miss the future; and science fiction is the best way to experience what you miss. The movie is an interesting take on the man-machine (orgo-mecha) relationship and potentially where it is heading.

DOS attack

After over a week, the site is back. Last October, the period of downtime was due to DNS configuration issues. This time, its a collection of cascading problems: all to do with the hosting provider’s data centre turned off my server due to a Denial of Service attack. In fact, look at the logs the downtime was exactly 10 days – to the hour and minute.

I do keep backups, and these were restored on Saturday 15th March. If I had time earlier in the week, this would have been completed sooner. But it was just one of those things that happens in the IT industry. Having a contigency plan is highly important.

In the interim, I’ve been to Adelaide and Perth (hi Cari!), purchased a new mobile phone (Nokia 6310i: Bluetooth and GPRS) and had a typical Adobe crunch-week. Lots going on, brain going at a million miles an hour.

The “idea” with Bluetooth and GPRS is to get faster wireless internet access from anywhere. Including the back of a taxi. I calculated that in recent weeks I have spent over 8 hours in taxis — perfect time to get online and grab/respond to a couple more emails. Is this the first signs of addiction?

MINI, Travel

I miss my family. And my MINI. In that order. 14 hours in economy from LAX to SYD, and according to Qantas last night – the flight is at 100% capacity. Oh joy oh bliss.

Adobe Acrobat Reader and Forms Data without Custom CGI


Adobe Acrobat, Forms and Email; no custom CGI

Adobe Acrobat 5.0 permits the submission of form data via an email connection. However, the free Adobe Acrobat Reader does not permit the submission of form data to via an email message, directly out of the application. Or does it?

As I get this question about once a week, I decided to research and write a small article about how to implement this using Adobe Acrobat here.

There are two solutions: either code your own CGI script in a variety of languages: PERL, PHP, ASP, JSP etc (see: PDF Forms and Javascript), or alternatively use one of the most common pre-installed CGIs: Formmail.

Programming CGI is not a simple “Learn programming CGI in 24-hours” topic. There is a smarter way: by using a CGI that has been “previously cooked in the oven”. Most ISPs and web hosting organisations know that expecting every customer to be a code-jockey is a little steep, therefore they install some default CGIs. “Formmail.cgi” is a simple CGI that takes form data, and emails the result to a nominated email account.

What is Formmail?

From Matt Wright’s Formmail: FormMail is a generic HTML form to e-mail gateway that parses the results of any HTML form and sends them to the specified users. This script has many formatting and operational options, most of which can be specified within each form, meaning you don't need programming knowledge or multiple scripts for multiple forms.

As this is an extremely common CGI, you should be able to get your ISP or web server administrator to install it; or at least a CGI that replicates its functionality. Hostforweb is my third ISP/host since early 2002 and each of the previous two also had a Formmail CGI facility.

So how does CGI and HTML forms relate to Adobe PDF?

Normally, this CGI relies on HTML forms. But aren’t we talking about PDF Forms? With Acrobat, one of the submission formats for forms data is HTML encoded data being received by a CGI. All we need to do is ensure that we submit the PDF form data in a HTML format; and submit fields that the Formmail CGI recognises.

This also does not require any special configuration of email application on the client end. All they need is Acrobat Reader/Adobe Reader installed.

How to Create the Form in Acrobat

Let’s take the example form: a simple web site feedback form for this site. I’ll set up this the forms submission occur via CGI-Formmail.

Download the form here: Feedback Form. Open in Adobe/Acrobat Reader and complete the form.

This form is a simple feedback form. If you click on the Submit button, it will send me an email that looks something like this:

[1352] email_response.gif

The creation of form fields in Acrobat is simple: just use the Form tool, creating text fields in the places you would like them to appear.

Behind the scenes on this form live 3 hidden fields. It is extremely important to name the fields with the required names for the CGI. These fields are sent to the CGI and are used to inform the CGI where to send the data, the subject on the email, who the form is sent from. In Formmail’s instance, its needs at least one field: recipient. In my example, I have added two extra fields: subject (this will be the subject of the email sent to me) and redirect (this is where the CGI will return the user once it has sent the email)

[1353] hiddenfields.jpg

Below, I have clicked on the field “recipient” There are two important things I have configured on this field: firstly, the fact that it is “hidden” – you cannot see it when you are entering data into the form. The second change I have made is to set a default value: the recipient of the form data.

[1354] recipient.gif

The Submit button has special options. When you create the button, in the Actions I have created a “mouse up, Submit Form” action as below:

[1355] submit-1.gif

[1356] submit-2.gif

When you edit the Action, you can nominate the URL. In my instance, the URL is http://thedigitalcottage.com/cgi-sys/FormMail.cgi. This URL WILL NOT WORK in your form – you will need to determine from your hosting provider the URL to their Formmail installation. There are some special anti-SPAM features in Formmail that does not permit the use of my CGI with your site. To have the PDF form submit the data in a format that Formmail can understand, its important that the Export Format is HTML.

One of the Anti-SPAM features of Formmail is restricting who can be the recipient of a particular form. You will need to consult with your ISP to determine what security settings they have applied to their Formmail installation to restrict who the data from the form can be sent to.

Once completed, you load the PDF form or email the form in the normal manner.

Now the final user of the form will be able to Submit data back, without the need of a custom CGI script.