HTTP communication between servers.

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

HTTP communication between servers.

Post by claws »

hi everyone.
http
browser <-----------> server

browser is nothing but a http client = communicates using HTTP.


http http
browser ----------> server -----------> server

can we some how implement the second stage of above communication?
i mean if using server side laguage.. in the page that is requested for if it in turn requests some other server and sends the data to the client that it fetched from other server.
is it feasible? possible ? if so.. how?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Yes, it is.

SOAP, REST, RPC (XML or other), etc. have been using communication over http for years.
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

Post by claws »

thanks :D

yeah i dont know about these. definitely i will learn all these. but i have a small doubt. using this can i fetch anything i want. are these as good as HTTP.

like fetching an object that is pointed by URL.

SOAP, REST, RPC (XML or other), etc. have been using communication over http for years.
can you please remove that etc. and then tell what else are available.

sorry. its not that i want spoon feeding. i don't know what are all the technologies are available.
so.. for me to google also. i need to know atleast the name of technology

so, can you please tell me the technologies till date to implement this type of communication.
pointing to some other page would be more help ful
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

claws wrote:thanks :D

yeah i dont know about these. definitely i will learn all these. but i have a small doubt. using this can i fetch anything i want. are these as good as HTTP.

like fetching an object that is pointed by URL.

SOAP, REST, RPC (XML or other), etc. have been using communication over http for years.
can you please remove that etc. and then tell what else are available.

sorry. its not that i want spoon feeding. i don't know what are all the technologies are available.
so.. for me to google also. i need to know atleast the name of technology

so, can you please tell me the technologies till date to implement this type of communication.
pointing to some other page would be more help ful
SOAP is an complete protocol for using services wrapped around http.
REST is a standard way of accessing services with HTTP (typically using XML or JSON).
RPC is just a fancy way of saying that one server commincates with another over HTTP.

If you're wondering how to connect to a server using HTTP from a PHP script without worrying about if you're using REST or SOAP etc then you have a few options:

file_get_contents() or fopen() for really basic reads.
curl_*() (The cURL library functions) for advanced connectivity.
fsockopen() if you really want to get muck under your fingernails.
Post Reply