Short answer use
curl library
For Long answer read below :
I think ur php server will be running to default port 80 or 8080. If not u can check port number in httpd.conf file. If it is windows then u can use
On a newer version of WAMP, click the WAMP server icon > Apache > httpd.conf
For ip if machine is same then use 127.0.0.1, if it is different server then run "ipconfig" or "ifconfig" command on command prompt (or terminal) of ur php server machine. Try pinging that ip first from the machine where u want to put ur exe. It must ping otherwise check antivirus or may be that is internal ip behind some firewall. Now u got ip & port so now u can try to connect. This is very low level connection. If your server gives data in markup language then u have to parse that.