This is the most common question with the most simple answer is USE URI.
if you request an HTTP server with proper URL then your http server will response without knowing who asked for(by knowing I mean programming language, but sometime it is important to know who is asking for, but yet not related to programming language. ). Even if you develop a C Program to communicate with a PHP script base server and ask it in proper manner it will response.
A simple example of URL is
www.someone.com?with=something&alsowith=otherthing
when you would request that url then your browser (with lots other info) will generate below request:
GET /with=something&alsowith=otherthing HTTP/1.1
Host: www.someone.com
Now Your program, whatever the language is, will connect to www.someone.com with port 80(it can be different) and then send above request and your http server will response. as a matter of fact this answer wont help you, learn more about client/server Application and HTTP server