aaronking Posted June 17, 2007 Share Posted June 17, 2007 hello, Does anyone know how to connect to a device eg. 203.xx.xxx.xxx with the port number 80 and once connected send a string to it using php? I have tryed 'fsockopen' but i don't know how to send stuff using it.. can someone give me a working example or help me out.. I am doing this for the first time. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/55944-connect-to-device-and-send-string/ Share on other sites More sharing options...
chigley Posted June 17, 2007 Share Posted June 17, 2007 How does the device receive the data? You won't get very far without knowing that.. Quote Link to comment https://forums.phpfreaks.com/topic/55944-connect-to-device-and-send-string/#findComment-276288 Share on other sites More sharing options...
aaronking Posted June 17, 2007 Author Share Posted June 17, 2007 The device is ment to be connected via a network using TCP/IP (winsock) however I have opened telnet and connected to it though that and it connects and works. however doing it in php I have no idea how to send data to the device. --- --- --- --- --- --- I have used Visual Basic 6.0 to connect to this device using the winsock control and sent the data to it.. Code: Winsock1.sendData "123" and it works but i want to do the same but in php --- --- --- --- --- --- Quote Link to comment https://forums.phpfreaks.com/topic/55944-connect-to-device-and-send-string/#findComment-276301 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.