<p>I want to make an etag that matches what Apache produces.  How does apache create it's etags?</p>

Apache uses the standard format of inode-filesize-mtime.  The only caveat to this is that the mtime must be epoch time and padded with zeros so it is 16 digits.  Here is how to do it in PHP:
```
```
$fs = stat($file);
header("Etag: ".sprintf('"%x-%x-%s"', $fs['ino'], $fs['size'],base_convert(str_pad($fs['mtime'],16,"0"),10,16)));
```
```