Jump to content

Consuming a webservice?


deostroll

Recommended Posts

Erm... I'm not sure the OP wants to contact another server; that comment was just in case he did.We should probably wait for a reply from him before we start discussing an imaginary problem (then he comes back with questions and we're still trying to solve the imaginary problem).

Link to comment
Share on other sites

Can javascript call out to a remote webservice so that we can display updated information like for e.g. a weather forecast in our normal html pages.
Unless he's running his own weather forecast server I'm pretty sure he's talking about pulling in remote data, in which case you would either need to use the SOAP functions or file_get_contents, but you would need to use a PHP AJAX proxy. So the AJAX page sends a request to a local PHP page (which is legal), and the PHP page sends the request for the remote data (which is also legal). You can use a function like file or file_get_contents if the URL wrappers for fopen are enabled. So PHP would get the remote data and forward it on to the AJAX response.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...