php - Calling function or script on another server and receiving response -


what want able call function or script on server using php , receive response. let me set example:

on web application, have page, , need send data server, have server work , return response.

web application:

<?php  // call server script, sending example string, "teststring", wait response  ?> 

server script:

<?php  // string "teststring", work on , return it, displaying on web app  ?> 

i'm not looking complete me, head me in right direction. i've read curl can useful this, have yet able examples work me, such these ones:

http://www.jonasjohn.de/snippets/php/curl-example.htm

how response using curl in php

so what's ideal route head in solve problem?

if not have control on both machines or host server not provide api able that, not doable. otherwise simple setting code on host server receive commands client, process , respond accordingly. once setup can call server code either curl or file_get_contents


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -