Created
September 15, 2011 17:40
-
-
Save url2png/1219927 to your computer and use it in GitHub Desktop.
Daily Website Screenshot for Timelapse Video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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