WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • [Request] Auto download file snippet
  • Print
Pages: [1]   Go Down

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

Offline bupaje

  • Posts: 592
[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.
Logged

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
Logged

Offline bupaje

  • Posts: 592
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.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • [Request] Auto download file snippet
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2