Shell Script To Cache Feedburner.com Chicklet Locally
Posted in File-management » HTTP » Web Server
A shell script to cache feedburner.com chicklet locally to improve performance by making fewer external http requests.
Install this script using a cron job:
@daily /path/to/script.sh
#!/bin/bash # Shell Script to cache feedburner.com Chicklet locally # ------------------------------------------------------------------------- # Copyright (c) 2007 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ------------------------------------------------------------------------- # This script is part of nixCraft shell script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- # Set me first # # Your Feedburner url FURL="http://feeds.feedburner.com/~fc/Nixcraft-LinuxFreebsdSolarisTipsTricks" # local path to save gif file LOCALFILE="/var/www/images/rss/feedburner.gif" # local web server user WUSER="lighttpd" WGROUP="lighttpd" # get file using wget and set permissions # $$ pass current PID to avoid Feedburner.com cache /usr/bin/wget -O "${LOCALFILE}" "${FURL}?$$" &> /dev/null chown ${WUSER}:${WGROUP} ${LOCALFILE}
Run above script and modify your template / html code with following :
<img src="/path/to/feedburner.gif" alt="">
Download - Email this to a friend - Printable version
Related Other Helpful Shell Scripts:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: apache web server, chown command, cron job, feedburner, images, lighttpd web server, web server user ~ Last updated on: May 27, 2008

