<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Web Development Blog &#187; Scripts</title>
	<atom:link href="http://www.thewebdevelopmentblog.com/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thewebdevelopmentblog.com</link>
	<description>News, tips, scripts and tutorials for web developers.</description>
	<lastBuildDate>Thu, 25 Aug 2011 11:15:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Manipulating Images in PHP: Easy GD functions to make editing images easier.</title>
		<link>http://www.thewebdevelopmentblog.com/2010/03/manipulating-images-in-php-easy-gd-functions-to-make-editing-images-easier/</link>
		<comments>http://www.thewebdevelopmentblog.com/2010/03/manipulating-images-in-php-easy-gd-functions-to-make-editing-images-easier/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 06:49:28 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[GD]]></category>

		<guid isPermaLink="false">http://www.thewebdevelopmentblog.com/?p=438</guid>
		<description><![CDATA[Having done quite a bit of delving into using GD to do tasks such as resize images, rotate images and crop images I&#8217;ve found it&#8217;s quite a long process to code something that should be rather simple. To make it easier I&#8217;ve created a set of functions to do these simple tasks, simply&#8230; Get The [...]]]></description>
			<content:encoded><![CDATA[<p>Having done quite a bit of delving into using GD to do tasks such as resize images, rotate images and crop images I&#8217;ve found it&#8217;s quite a long process to code something that should be rather simple. To make it easier I&#8217;ve created a set of functions to do these simple tasks, simply&#8230;<br />
<span id="more-438"></span></p>
<h2>Get The Functions</h2>
<p>Download the functions here: <a href="http://www.thewebdevelopmentblog.com/examples/gd-image/gd-image.zip">GD Functions V1.0</a></p>
<h2>Using The Functions</h2>
<p>There are currently 3 functions included that are quite flexible and they allow you to:</p>
<ul>
<li>Resize Images</li>
<li>Rotate Images</li>
<li>Crop Images</li>
</ul>
<p>This is a pretty standard set of functions but they are very easy to use, and they do all the heavy GD lifting for you.</p>
<p>In order to use the functions you must first include the <a href="http://www.thewebdevelopmentblog.com/examples/gd-image/gd-image.zip">GD Functions</a> into your page.</p>
<p>&nbsp;</p>
<p><code></p>
<pre><!--?php
require_once("gd-images.min.php");
?--></pre>
<p></code></p>
<p>&nbsp;</p>
<h3>resizeImage(file, width, height, [newFile, [forceResize, [quality]]]);</h3>
<p>Can resize an image in PHP.</p>
<p style="padding-left: 30px;"><strong>File: </strong>The address to the file you wish to resize. eg. <em>&#8220;../storage/my-image.jpg&#8221;</em></p>
<p style="padding-left: 30px;"><strong>Width: </strong>The max width (or new width) for the image to be resized to. eg. <em>125</em></p>
<p style="padding-left: 30px;"><strong>Height: </strong>The max height (or new height) for the image to be resized to. eg. <em>125</em></p>
<p style="padding-left: 30px;"><strong>NewFile: </strong>(optional, default:<em>file</em>) If set, it will create a new file at this address instead of replacing the old image file.eg. <em>&#8220;../storage/my-new-image.jpg&#8221;</em></p>
<p style="padding-left: 30px;"><strong>ForceResize: </strong>(optional, default:<em>false</em>) If set to true will force the image to resize (in ratio) to the new height. eg. <em>true</em></p>
<p style="padding-left: 30px;"><strong>Quality: </strong>(optional, default:<em>90</em>) The quality of the image being exported. Integer between 0-100, 100 being the best quality. eg. <em>80</em></p>
<p>&nbsp;</p>
<p><code></p>
<pre><!--?php
require_once("gd-images.min.php");
// Resize Example
resizeImage("../storage/my-image.jpg", 125, 125, "../storage/my-new-image.jpg", true, 75);
?--></pre>
<p></code></p>
<p>&nbsp;</p>
<h3>rotateImage(file, Angle, [newFile]);</h3>
<p>Can rotate an image to any angle in PHP.</p>
<p style="padding-left: 30px;"><strong>File:</strong> The address to the file you wish to rotate. eg. <em>&#8220;../storage/my-image.jpg&#8221;</em></p>
<p style="padding-left: 30px;"><strong>Angle: </strong>The angle you would like to rotate the image to. Integer between 0-360. eg. <em>90</em></p>
<p style="padding-left: 30px;"><strong>NewFile: </strong>(optional, default:<em>file</em>) If set, it will create a new file at this address instead of replacing the old image file.eg. <em>&#8220;../storage/my-new-image.jpg&#8221;</em></p>
<p>&nbsp;</p>
<p><code></p>
<pre><!--?php
require_once("gd-images.min.php");
// Rotate Example
rotateImage("../storage/my-image.jpg", 180, "../storage/my-new-image.jpg");
?--></pre>
<p></code></p>
<p>&nbsp;</p>
<h3>cropImage(file, X1, Y1, X2, Y2, [width, [height, [newFile]]]);</h3>
<p>Can crop a portion of an image, then resize that portion to a specified width/height in PHP.</p>
<p style="padding-left: 30px;"><strong>File:</strong> The address to the file you wish to crop. eg. <em>&#8220;../storage/my-image.jpg&#8221;</em></p>
<p style="padding-left: 30px;"><strong>X1: </strong>The X co-ordinate for the top left corner of the position you wish to cut. Integer. eg. <em>10</em></p>
<p style="padding-left: 30px;"><strong>Y1: </strong>The Y co-ordinate for the top left corner of the position you wish to cut. Integer. eg.<em> <em>10</em></em></p>
<p style="padding-left: 30px;"><strong>X2: </strong>The X co-ordinate for the bottom right corner of the position you wish to cut. Integer. eg. <em>100</em></p>
<p style="padding-left: 30px;"><strong>Y2: </strong>The Y co-ordinate for the bottom right corner of the position you wish to cut. Integer. eg. <em>100</em></p>
<p style="padding-left: 30px;"><strong>Width: </strong>(optional, default:<em>cropWidth</em>) The width you&#8217;d like the cropped image to be. If not set it will default to the width of the area being cropped. Integer. eg. <em>50</em></p>
<p style="padding-left: 30px;"><strong>Height: </strong>(optional, default:<em>cropHeight</em>) The height you&#8217;d like the cropped image to be. If not set it will default to the height of the area being cropped. Integer. eg. <em>50</em></p>
<p style="padding-left: 30px;"><strong>NewFile: </strong>(optional, default:<em>file</em>) If set, it will create a new file at this address instead of replacing the old image file.eg. <em>&#8220;../storage/my-new-image.jpg&#8221;</em></p>
<p>&nbsp;</p>
<p><code></p>
<pre><!--?php
require_once("gd-images.min.php");
// Crop Example
rotateImage("../storage/my-image.jpg", 10, 10, 100, 100, 50, 50, "../storage/my-new-image.jpg");
?--></pre>
<p></code></p>
<p>&nbsp;</p>
<blockquote><p><em><span style="font-style: normal;"><strong>Notes</strong></span></em></p>
<ul>
<li>Requires the PHP GD extension installed to work (comes with most hosting set-ups)</li>
<li>Supports JPEG, PNG &amp; GIF files.</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2010/03/manipulating-images-in-php-easy-gd-functions-to-make-editing-images-easier/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Zip files using PHP without the PHP zip function: PHP Zip Class</title>
		<link>http://www.thewebdevelopmentblog.com/2009/08/script-zip-files-using-php-without-the-php-zip-function-php-zip-class/</link>
		<comments>http://www.thewebdevelopmentblog.com/2009/08/script-zip-files-using-php-without-the-php-zip-function-php-zip-class/#comments</comments>
		<pubDate>Sat, 22 Aug 2009 09:14:05 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[PHP Class]]></category>
		<category><![CDATA[Zip]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=260</guid>
		<description><![CDATA[The search for a PHP class to zip files has taken me well over 2 years. Going from not being able to find ANY to being able to find some that worked but wouldn&#8217;t unzip on MAC, the search seemed as if it would go on forever. A lot of web hosts don&#8217;t have the [...]]]></description>
			<content:encoded><![CDATA[<p>The search for a PHP class to zip files has taken me well over 2 years. Going from not being able to find ANY to being able to find some that worked but wouldn&#8217;t unzip on MAC, the search seemed as if it would go on forever. A lot of web hosts don&#8217;t have the PHP zip function installed yet creating zip&#8217;s is quite important and handy to a lot of project. Today my search is finally over and I have finally found an easy + working PHP class for zipping files.</p>
<p><span id="more-260"></span></p>
<p><strong>Download The Class</strong></p>
<p>Upload the unzipped class to your site (<a href="http://thewebdevelopmentblog.com/examples/zip/zipclass.zip">Click here to download the class</a>)</p>
<p><strong>The Code &#8211; Download File</strong></p>
<p>The following is the base code of how the script works. All you need to do is replace the $fileonserver and $filename to the file(s) you wish to zip.</p>
<p><code>include("zip_min.inc");<br />
$zipfile = new zipfile();<br />
$fileonserver = "path/to/file/oldfilename.txt";<br />
$filename = "newfilename.txt";<br />
$zipfile -&gt; addFile(file_get_contents($fileonserver), $filename);<br />
// Force download the zip<br />
header("Content-type: application/octet-stream");<br />
header("Content-disposition: attachment; filename=test.zip");<br />
echo $zipfile -&gt; file();</code></p>
<p>You may add more files by repeating the &#8220;$zipfile -&gt; addFile&#8221; script with more files. The above will send the file straight to the user (not create a file on your server).</p>
<p><strong>The Code &#8211; Save File To Server</strong></p>
<p>You can save the zip to the server by using the file_put_contents() function as follows:</p>
<p><code>include("zip_min.inc");<br />
$zipfile = new zipfile();<br />
$fileonserver = "path/to/file/oldfilename.txt";<br />
$filename = "newfilename.txt";<br />
$zipfile -&gt; addFile(file_get_contents($fileonserver), $filename);<br />
$contents = $zipfile -&gt; file();<br />
file_put_contents("test.zip", $contents);</code></p>
<p>As you can see it&#8217;s a short and simple process. Script seems to work quite fast too. I&#8217;ve tested the downloaded files on both Mac and Windows and it seems to work beautifully.</p>
<p><strong>Notes</strong></p>
<ul>
<li><em>If you get an error with memory you&#8217;ll need to allow more PHP memory by updating your php.ini file or by using a .htaccess script. (Google it)</em></li>
<li><em>Requires gzcompress PHP function (most hosts have this installed already)</em></li>
<li><em>If you change the file name of the download in the header script make sure there are no spaces in the file name.</em></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2009/08/script-zip-files-using-php-without-the-php-zip-function-php-zip-class/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Finding the X &amp; Y coordinates of an element relative to the entire page using Javascript</title>
		<link>http://www.thewebdevelopmentblog.com/2009/06/tip-getting-the-x-y-coordinates-of-an-element-relative-to-the-entire-page-using-javascript/</link>
		<comments>http://www.thewebdevelopmentblog.com/2009/06/tip-getting-the-x-y-coordinates-of-an-element-relative-to-the-entire-page-using-javascript/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 08:16:48 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=187</guid>
		<description><![CDATA[It&#8217;s really easy to get the position of an element relative to it&#8217;s parent element, but what if you wanted to get it&#8217;s position relative to the entire page (viewport)? There&#8217;s no javascript call to do this, but here is a function to get the elements x &#38; y coordinates. If you use the prototype [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s really easy to get the position of an element relative to it&#8217;s parent element, but what if you wanted to get it&#8217;s position relative to the entire page (viewport)? There&#8217;s no javascript call to do this, but here is a function to get the elements x &amp; y coordinates.</p>
<p><span id="more-187"></span></p>
<p>If you use the <a href="http://www.prototypejs.org" target="_blank">prototype javascript framework</a> there is a call built in! Handy&#8230;</p>
<p><strong>Here&#8217;s the code for Prototype users:</strong></p>
<p><code>var pos = $("<em>elementID</em>").viewportOffset();<br />
var x = pos[0];<br />
var y = pos[1];</code></p>
<p>Nice and easy&#8230;</p>
<p>For those of you who <strong>don&#8217;t</strong> use prototype, below is a function you can use to get the X &amp; Y coordinates relative to the page (viewport).</p>
<p><strong>The Function:</strong></p>
<pre><code>function viewportOffset(forElement) {
	var valueT = 0, valueL = 0;&lt;
	var element = document.getElementById(forElement);
	do {
		valueT += element.offsetTop  || 0;
		valueL += element.offsetLeft || 0;
		if (element.offsetParent == document.body) break;
	} while (element = element.offsetParent);
	element = forElement;
	do {
		if (element.tagName == 'BODY') {
			valueT -= element.scrollTop  || 0;
			valueL -= element.scrollLeft || 0;
		}
	} while (element = element.parentNode);
	return [valueL, valueT];
}</code></pre>
<p><em>This is a modified function from the </em><em><a href="http://www.prototypejs.org" target="_blank">prototype framework</a></em>.</p>
<p><strong>Calling The Function:</strong></p>
<p><code>var pos = viewportOffset("<em>elementID</em>");<br />
var x = pos[0];<br />
var y = pos[1];</code></p>
<p>I tried several of the functions on various blogs etc none of them seemed to return anything but 0 in Safari. The above has been tested and works in the latest versions Safari, Firefox, IE and Opera.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2009/06/tip-getting-the-x-y-coordinates-of-an-element-relative-to-the-entire-page-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New version of gzip for Javascript &amp; CSS now available</title>
		<link>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 05:04:41 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=143</guid>
		<description><![CDATA[I&#8217;ve released version 1.1.1 of my gzip php script for Javascript and CSS which is a minor updates and adds a few handy new features. You can get the latest version of the script here. You can read the release notes here.]]></description>
			<content:encoded><![CDATA[<div>
<p>I&#8217;ve released version 1.1.1 of my gzip php script for Javascript and CSS which is a minor updates and adds a few handy new features. You can get the latest version of the script <a title="Go to the Gzip compression blog post" href="http://thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/" target="_self">here</a>. You can read the <a title="View the gzip compression release notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">release notes here</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/12/script-new-version-of-gzip-for-javascript-css-now-available/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gzip compression script for javascript and CSS updated</title>
		<link>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 09:21:11 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=140</guid>
		<description><![CDATA[Today I&#8217;ve updated my gzip compression for javascript and CSS script to fix a security flaw. If you&#8217;re using V1.0 I advise you update to V1.1 which is available here. You can read the release notes here.]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve updated my gzip compression for javascript and CSS script to fix a security flaw. If you&#8217;re using V1.0 I advise you update to V1.1 which is available <a title="Go to the Gzip compression blog post" href="http://thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/" target="_self">here</a>. You can read the <a title="View the gzip compression release notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">release notes here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/11/tipscript-gzip-compression-script-for-javascript-and-css-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up your websites using gzip and merging files.</title>
		<link>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/</link>
		<comments>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 08:07:50 +0000</pubDate>
		<dc:creator>Jason Stockton</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Compression]]></category>
		<category><![CDATA[Gzip]]></category>
		<category><![CDATA[Website Optimization]]></category>

		<guid isPermaLink="false">http://thewebdevelopmentblog.com/?p=95</guid>
		<description><![CDATA[Many sites these days are using more and more Javascript and CSS which can quickly slow the websites loading speed. Gzip compression for your Javascript and CSS is not used in enough websites these days as many people still fear incompatibility with browsers. However this is no longer the case as all modern browsers are [...]]]></description>
			<content:encoded><![CDATA[<p>Many sites these days are using more and more Javascript and CSS which can quickly slow the websites loading speed. Gzip compression for your Javascript and CSS is not used in enough websites these days as many people still fear incompatibility with browsers. However this is no longer the case as all modern browsers are now compatible with it. There are heaps of ways to Gzip, none of which I could get to work on my web host, so I created my own which uses the zlib extension in php. I also included a few advantages to it such as merging of files which helps decrease the loading time even more.</p>
<p><span id="more-95"></span></p>
<h1><strong>Step 1: </strong>Add the gzip.php file.</h1>
<p><a title="Download the gzip.php file and example here." href="http://thewebdevelopmentblog.com/examples/gzip/gzip.zip" target="_self">Download the gzip.php file here. (V1.1.1)</a></p>
<p>Then add it to the root directory of your website.</p>
<h1><strong>Step 2:</strong> Adjust your HTML.</h1>
<p>We now need to set your Javascript and CSS to run through the compression. We do this by adjusting the script and style addresses as follows&#8230;</p>
<p><strong>For CSS</strong></p>
<p><code>&lt;link href="gzip.php?f0=<em>css/main.css</em>" rel="stylesheet" type="text/css"&gt;</code></p>
<p><strong>For Javascript</strong></p>
<p><code>&lt;script src="gzip.php?f0=<em>javascript/main.js</em>" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>To change the address of the scripts just change the address that is in italic. Files are restricted to only files with the .css or .js extension.</p>
<h1><strong>Step 3: </strong>Merging Files.</h1>
<p>Another slow point for loading time is using multiple Javascript files and CSS style sheets. The reason for this is for each file the browser needs to re-connect to the server before it can download it. However if you&#8217;re like me, you don&#8217;t want to have to merge all your files into 1 manually, so I&#8217;ve built in this ability into gzip.php. Simply merge files together as follows&#8230;</p>
<p><strong>For CSS</strong></p>
<p><code>&lt;link href="gzip.php?f0=<em>css/main.css</em>&amp;f1=<em>css/more.css</em>&amp;f2=<em>css/evenmore.css</em>" rel="stylesheet" type="text/css"&gt;</code></p>
<p><strong>For Javascript</strong></p>
<p><code>&lt;script src="gzip.php?f0=<em>javascript/main.js</em>&amp;f1=<em>javascript/more.js</em>&amp;f2=<em>javascript/evenmore.js</em>" type="text/javascript"&gt;&lt;/script&gt;</code></p>
<p>So as you can see you can add files by adding in more <em>f</em> variables which count up from 0. You can add up to 100 files in the current configuration. Although if you have that many Javascript or CSS files then you should look at fixing that&#8230;</p>
<p><strong>NOTE: </strong>Make sure you don&#8217;t miss any numbers when counting up otherwise it won&#8217;t include all your files.</p>
<h1><strong>Step 4: </strong>Caching Files.</h1>
<p>Another trick that will help speed up your site is caching these files. Again I have that covered! Simply add <em>cache=true&amp;</em> to the front of the file address as follows&#8230;</p>
<p><code>gzip.php?<em>cache=true&amp;</em>f0=javascript/main.js&amp;f1=javascript/more.js</code></p>
<p>If you don&#8217;t want to have the default 3 days expiry you may add in exp=#ofDays&amp; and it will change the expiry period. For example the following will set the cache period to 31 days&#8230;</p>
<p><code>gzip.php?cache=true&amp;exp=31&amp;f0=javascript/main.js&amp;f1=javascript/more.js</code></p>
<p><strong>NOTE: </strong>It is not recommended that you cache files that are updated frequently as when the file is updated it won&#8217;t update in the browser for the number of days you set.</p>
<p>And there you have it! I have decreased loading time on my sites dramatically using this exact script so I hope it helps you out as much as it has with me!</p>
<p><strong>UPDATE:</strong> Just released version 1.1.1 which adds new functionality and better ways to pinpoint errors. <a title="View Gzip Compression V1.1 Release Notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">Release Notes</a>.</p>
<p><strong>UPDATE:</strong> Just released version 1.1 which fixes a security hole (thanks for the heads up Nail) as well as a number of other minor updates. <a title="View Gzip Compression V1.1 Release Notes" href="http://thewebdevelopmentblog.com/examples/gzip/gzip/releasenotes.txt" target="_blank">Release Notes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebdevelopmentblog.com/2008/10/tip-speed-up-your-websites-using-gzip-and-merging-files/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>

