Page 1 of 1
Passing data from one server to another
Posted: Thu Mar 11, 2010 1:14 pm
by stom
Suppose that there are 2 applications. One is in my server and the other is a different server. I want to have a link in the remote application which when clicked should open the webpage in my application. Some data should also be sent to my webpage so that i can preload the textboxes with that data.
I am thinking of using webservices, but i am not sure how to write the code for this. Please help me out.
Re: Passing data from one server to another
Posted: Thu Mar 11, 2010 1:34 pm
by requinix
Easiest method would be to have the server POST data to wherever on your server.
Re: Passing data from one server to another
Posted: Thu Mar 11, 2010 1:39 pm
by stom
Thanks... but will the POST work even if the remote application is in .net and my application uses php?
Re: Passing data from one server to another
Posted: Thu Mar 11, 2010 2:17 pm
by AbraCadaver
The answer is yes if you know how to code the post action in the .NET app and to receive it in the PHP app. Depending upon the sensitivity of your data and the amount of data, you might use GET parameters:
remote app
Code: Select all
<a href="http://example.com/php_app.php?text1=foo&text2=bar">Click</a>
php app
Code: Select all
$text1 = $_GET['text1'];
$text2 = $_GET['text2'];