Re: please help in socket_send function in php



ranishobha21@xxxxxxxxx wrote:
On Feb 14, 12:35 am, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
ranishobh...@xxxxxxxxx wrote:
Dear all,
i want to send some unix commands to remote unix machine in france
throughphp.i am using socket communication inphp, i have written a
socket communication program so that it connects to the remote
machine.
i dont get any errors it says socket is connected.i dont know whether
the socket is connected or not.
now i want to send username and password to that remote machine.i am
using socket_send function.
$username='abcd';
$output=socket_send($socket, $username, strLen($username),0);
echo $output;
what ever i send it returns the value integer.for example if i send
$username ='abcd'; then it returns the length as 4,if i send abcde it
returns 5.
I think my username and password is not reaching to the remote machine
when i use socket_send.
can you please give some suggesions
Regards
shobha
Hi,Shobha,

It's hard to tell with the code you posted. Can you post the real code?
Or, if it's large, cut it down to the bare minimum and post it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================- Hide quoted text -

- Show quoted text -

Hi Jerry and all,

i want to connect to a remote machine using socket programming in
php.i have hostname,port number,username and password.how can i send
it.i want to write a client program but unable to do it.can any one
help me.

Regards
shobha


Shobha,

As I said - it depends on what you're trying to do. Post a stripped down version of your code and we'll take a look at it.



--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: Bandwidth - Your experience?
    ... Fast and securely accessing all of remote data sources anywhere with ... > I have been considering a raw socket implementation but if the Remoting ... > connecting to the remote server. ... > BinaryServerFormatterSinkProvider(); ...
    (microsoft.public.dotnet.framework.remoting)
  • Network pipes
    ... user to create a pipeline over the network using a socket as its ... has tar sending each block through a pipe to a local ssh process, ... communicating with sshd through a pipe again. ... local and the remote host with the standard output of tar and the ...
    (freebsd-hackers)
  • Re: please help in socket_send function in php
    ... i want to send some unix commands to remote unix machine in france ... socket communication program so that it connects to the remote ... now i want to send username and password to that remote machine.i am ... Jerry Stuckle ...
    (comp.lang.php)
  • Re: Socket errors and errno.
    ... > (and attempt a recovery if possible). ... > the socket is ready to read/write. ... > re-establish the connection with the remote host. ... Perhaps detecting the EPIPE error condition and trying to reconnect ...
    (comp.unix.programmer)
  • Re: please help in socket_send function in php
    ... i want to send some unix commands to remote unix machine in france ... socket communication program so that it connects to the remote ... now i want to send username and password to that remote machine.i am ...
    (comp.lang.php)