Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Trying to write a raw tcp connection
I have been working on this for 2 days with little luck. Can someone give me some links to some sites that explain more about raw tcp and what it takes to make the connection. This is my code. It keeps telling me can not connect, but sometimes it does connect. The code is to connect to a serial port server that has a device attached via serial connection. Thanks ahead of time for any responses.
$host1 = "192.168.1.81";
$port = "8001";
$pserv1 = pfsockopen($host1, $port);