Communicating with EXE

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dwfait
Forum Contributor
Posts: 113
Joined: Sun Aug 01, 2004 10:36 pm

Communicating with EXE

Post by dwfait »

Hi all again. Would it be possible for PHP code to communicate via TCP/IP, or better, UDP, with an EXE on a port such as 1000, or 5000?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yes... the "exe" would have to open and listen to such port.. and be allowed to by the OS/firewall. fsockopen() can open the port via TCP. I don't know about connected via UDP.
dwfait
Forum Contributor
Posts: 113
Joined: Sun Aug 01, 2004 10:36 pm

Post by dwfait »

And then after youve opened the connection with fsockopen(), you would write to it like a file? writestream? or writestring?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why not try it, or read the docs.. ;)
Post Reply