1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

using PHP to compress files

Discussion in 'Off Topic' started by Xarcell, Sep 24, 2011.

  1. Xarcell

    Xarcell Well-Known Member

    I came across this site: http://aciddrop.com/php-speedy/

    And was wondering what others thought of it? I'm not a php coder, so I wouldn't know. I was looking into tools or programs to minimize my CSS & JS files when I found a PHP script that claims to do it all. Just to be clear, this isn't for a xF site, but rather a SMF one.

  2. Marcus

    Marcus Well-Known Member

    Which webserver do you use? You can use a basic shell script to compress all CSS & JS files on your server to the highest degree and then your webserver checks if you already compressed the file. It then serves the compressed file stored on your server. If there is no such file, your webserver compresses it and then serves it.

    I use 7zip as it compresses much better than gzip.

    I would not use a third party php script for that. For security reasons alone.
  3. Xarcell

    Xarcell Well-Known Member

    I'm not sure what your talking about, but I'm on shared hosting.

    I seen those shell scripts for gzip, but it is out of my comfort zone, I have no idea what I'm doing. I thought a php script may be better.
    Marcus likes this.
  4. Marcus

    Marcus Well-Known Member

    You have to make sure that you trust the php script. The shell script I use consists of 1 code line. So it's rather easy to understand. A PHP script on the other hand from an unknown source is something I would not like to use on my server without taking a look. I have made bad experiences with installing mods for my former board - some mods manipulated other areas from my forum I did not know about.

Share This Page