I've successfully been able to use:
both
shell_exec('socat -V')
and
system('socat -V')
My first question is:
Which one is better to use? I've been reading the man pages on each, but can't tell if either is better.
Also, why is it that these commands will work, but if I want to use socat with an address and port to connect to it won't generate any output? system('socat - TCP4:my.address:portnumber').
I'm working in Ubuntu and have the socat connection working fine in a shell, I'm just missing the php connection.
The server is working during the call, I've tried to flush() the php buffer and print out variables, but can't get anything.
Wondering if I might need to connect to a socket via php and maybe that is why it won't work via the shell command? If so, why?
Anyone have any insights on this?