I'm writing an application where I need to execute telnet to connect to an IP address on a specific port. Once connected, I can transmit some strings through telnet and store the responses. I was curious how to handle this. I might not even need to use telnet, I might just be able to open a socket, but I've been unable to find details on how to do this. I'm writing in C though I'm naturally a PHP programmer, so this is a bit new to me. Any detailed help would be greatly appreciated. Thank you.