Author Topic: [Request] Auto download file snippet  (Read 2940 times)

Offline bupaje

  • Posts: 570
    • http://www.stormvisions.com
[Request] Auto download file snippet
« on: September 02, 2008, 07:20:54 AM »
I was wondering if someone could share a bit of code. I would like to download this file https://ssl.google-analytics.com/ga.js and save it into my template folder and overwrite the existing one every so often. I'm just trying to speed up the code a little by hosting a local copy of this file. Maybe tie it to a simple count or date thing so it is only run once on the 1st and 15th of each month as the file won't change often -usually only once or twice a year but if I miss it it screws up your stats..

I tried a few things by hacking different code from the net but couldn't get anything to work. I even tried to auto download it to my desktop folder and then use a sync program to update the web folder but a few hours later I realized I might be better off asking than creating a Rube Goldberg machine -which is where this seems to be headed. :)

Thanks for any help.
My Blog, My Site

SourDough

  • Guest
Re: [Request] Auto download file snippet
« Reply #1 on: September 02, 2008, 03:38:27 PM »
Can you use cron and wget?

Nick

Offline bupaje

  • Posts: 570
    • http://www.stormvisions.com
Re: [Request] Auto download file snippet
« Reply #2 on: September 02, 2008, 03:57:34 PM »
I can't use cron -not available. Wget -hadn't seen that. I guess I can use that on my pc to download the file and maybe I can set up a webdav folder and save it there? Will take a look. I still wouldn't mind a php solution but I'll try. Thanks.
My Blog, My Site

 

postern-length