|
Posted by ranishobha21 on 02/19/07 16:03
Dear All,
I am sending the code below.i have not specifies the host name.i want
to send command to server and get the response from it.but it doesnt
work.when i connect with the telnet using ssh to remote machine it
works.
i type telnet hostname->username->password and then i can login to
the
remote machine.how can i send hostname with username and password to
remote machine in france
<?php
$cmnd= "abc";
$host="....";
$port="12345";
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP) ;
socket_connect($socket,$host,$port) ;
socket_write($socket, $cmnd) ;
$ser_messegeg=socket_read ($socket, 1024);
echo $ser_messege;
socket_close($socket) ;
}
?>
Please help me
Regards
shobha
Navigation:
[Reply to this message]
|