S
S
Sergey2018-02-04 11:20:18
linux
Sergey, 2018-02-04 11:20:18

Telnet command button in php?

Is there a working code on how to insert a button into it?

<?php                                                                                                                                                                                                       
$fp = fsockopen("127.0.0.1", 1234, $errno, $errstr, 30);                                                                                                                                                    
if (!$fp) {                                                                                                                                                                                                 
    echo "$errstr ($errno)<br />\n";                                                                                                                                                                        
} else {                                                                                                                                                                                                    
    $out = "rrmix.skip \r\n";                                                                                                                                                                               
    usleep(500);                                                                                                                                                                                            
    fwrite($fp, $out);                                                                                                                                                                                      
    echo fread($fp, 10);                                                                                                                                                                                    
    usleep(500);                                                                                                                                                                                            
    $out = "quit\r\n";                                                                                                                                                                                      
    fwrite($fp, $out);                                                                                                                                                                                      
    echo "<br>".fread($fp, 10);                                                                                                                                                                             
    fclose($fp);                                                                                                                                                                                            
}                                                                                                                                                                                                           
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2018-02-04
@Raschen

Option 1

<form action="/тут/ссылка/на/скрипт.php">
    <button type="submit">Кнопка</button>
</form>

Option 2 Further, the link can already be turned into a button using CSS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question