I am using php to execute an expect script which telnets to a remote server.
The problem is
I am encountering a lot of ‘more’ prompts from the server that usually occurs when the screen is full.
Is there a way to fool the server by advertising my screen size to be large?
Please note that I am not running php from cli, hence not sure how stty can be used here.
Recently I had the same need. After a lot of googling, reading a sources of telnet and expect manual page I have found a solution. You can set your desired pseudo-terminal (pty) size to 10000×200 for example like this: