Just thinking out loud... here's some pseudo code...

Code:

$number=1234567
open($file)
$=readline()
$found=0
while @error =0 and $found=0
if instr($,$number)
$found=1
endif
$=readline()
loop
close()