You are here: sending username and password with hostname in socket programming with php « PHP Programming Language « IT news, forums, messages
sending username and password with hostname in socket programming with php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация