<?php$fin = file('in.txt');$fout = fopen('out.txt', 'w+');foreach ($fin as $fline){ if (strlen($fline) <= 50) fputs($fout,$fline); }fclose ($fout);?>