<?php $file = file_get_contents('file.txt'); preg_match("#Temperature:(.*)\n#isU", $file, $out); echo $out['1']; ?>