Skip to content

Instantly share code, notes, and snippets.

@url2png
Created September 15, 2011 17:40
Show Gist options
  • Save url2png/1219927 to your computer and use it in GitHub Desktop.
Save url2png/1219927 to your computer and use it in GitHub Desktop.
Daily Website Screenshot for Timelapse Video
#!/usr/bin/env bash
# Daily Website Screenshot for Timelapse Video
# Add to your cronfile
# 0 1 * * * /bin/bash ~/website-screenshot-timelapse/website-screenshot-timelapse.sh > /dev/null 2>&1
# Replace this with your domain
# be sure to urlencode this value
url='http://url2png.com'
## Get yours at url2png.com/plans (Use coupon "timelapse" for 10% off your first month)
API_KEY="APIKEY"
SECRET="SECRET"
timestamp=`date +%Y%m%d%H%m%s`
TOKEN=$(echo -n "$SECRET+$url" | md5 | cut -d " " -f 1)
api="http://api.url2png.com/v3/$API_KEY/$TOKEN/ORIGINAL/$url"
curl -s "$api" > ~/website-screenshot-timelapse/$timestamp.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment