PHP | Command Prompt | Erase stuff that was echo'd?

question asker

New member
PHP has an 'exec' function which runs commands.. but the problem is that the command for clearing the screen is different on different operating systems.

I came up with this. It's basic but it does the job (kind of) and it will work on any system:

<?php
echo "Before clear screen";
$lines = 5000;
echo str_repeat("\n", $lines);
echo "After clear screen";
?>
 
In my php script, I have a thing where the have to enter there password. (It is on command prompt)
How can I make it so that it makes the password disapear after they hit enter?
 
Back
Top