O'Reilly logo

Amazon Hacks by Paul Bausch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Create Several Birthday Reminders at Once

You probably have dozens of birthdays to track. You can speed up the process of adding Amazon event reminders with a script.

If you have an entire address book of people’s birthdays that you’d like to receive reminders about, it could be a long process to enter them one by one into Amazon’s event reminder form. Instead, you can speed up the process considerably with some scripting.

This ASP page accepts a text list of names and birth dates and enters them all as Amazon events. This script runs on Windows servers running IIS.

The Code

As with other services that require you to be logged in, the event reminder service requires an Amazon session ID that is tied to your account. This script first logs in as you via SSL and sets the session ID. Then it loops through the birthdays, calling the AddEvent subroutine, which sends a form post to Amazon with the event information.

<%
' add_reminders.asp
' Turns a supplied list of names and birthdates into Amazon events
' Usage: An ASP page called from any web browser

Const YOUR_EMAIL = "insert email address"
Const AMZN_PASSWORD = "insert Amazon password" Const WinHttpRequestOption_EnableRedirects = 6 Sub AddEvent(sid,name,e_month,e_day) strURL = "https://www.amazon.com/exec/obidos/reminder-edit-done/" strURL = strURL & strSessionID strPostData = "reminder-id=" & _ "&reminder-frequency=on" & _ "&sort-by=reminder-date" & _ "&customer-email=" & YOUR_EMAIL & _ "&occasion-id=3" & _ "&smart-send-options-enabled=yes" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required