473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

sending username and password with hostname in socket programming with php

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

Feb 19 '07 #1
0 1839

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
3
by: Hans | last post by:
Hello, I am trying to create a Webrequest. The used Uri is something like "http://username@domain.com:password@www.shfgshfge.com". Note that the username contains an "@"-character. I tried two...
4
by: splicemix | last post by:
Hi all, I have recently set up a Drupal website. I am a beginner. My shared host server does not allow nobody@localhost to send emails, and prevents access to php.ini, so I spent some time...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
5
by: libra786 | last post by:
I have created a blog and have added a login box which prompts the user for login and id before posting- The username and password have been stored in the database, however when i enter the username...
1
by: MackTheKnife | last post by:
I'm trying to get into an installation of v.6.5 to use with another server and I need the following information: Database hostname Database name Database usernane Database password Is this...
1
by: Carl | last post by:
In ASP.Net, how can we connect to a nas that uses cifs for its file sharing protocol. Currently we should be able to provide the ip address or hostname of the nas, the sharename along with any...
2
by: poolboi | last post by:
hey guys i got the code below to authenticate users for database #!perl\bin\perl use strict; use warnings; use DBI();
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.