Ein kleines Script, welches die Dateigröße eines Strings ausgibt.
$size = mb_strlen('This is a string, what is the file size of it?', 'latin1');
if($size >= 1024)
$size = round($size / 1024, 2).' KB';
else
$size = $size.' bytes';
echo $size;
?>[/php]
Quelle: phpsnips.com