All pastes #432869 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-10 14:10 UTC
rendered paste body
function input()
{
        $fp = fopen("php://stdin", "r");
        if(!$fp)
        {
        	die("Unable to read input stream.\n");
        }
        $i=0;
        $run = true;
        while($run)
        {
        	$str .= $chr[$i] = fgetc($fp);
        	$i++;
        	if($chr[$i] == "\r")
        		$run = false;
        }
        fclose($fp);
        return $str;
}