Need to pass data to and back between a PHP page an .ASPX

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Corobori
Forum Newbie
Posts: 2
Joined: Sat Jan 07, 2006 7:20 am

Need to pass data to and back between a PHP page an .ASPX

Post by Corobori »

What is the option for what I need to do ?

From a PHP page I need to pass some information and execute an .ASPX located on another website which will return to me a string of caracter saying or "SUCCESSFULL" or "UNSUCCESSFULL".

How should I do this ?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

You could actually run the file on the other server and catch the output by doing:

Code: Select all

$data = file_get_contents('http://www.yourserver.com/remote_file.aspx');
echo $data;
There's also fsockopen() but that's a bit of an overkill I think... as for the aspx side of things I'm not familiar with it so I wouldn't know.
Corobori
Forum Newbie
Posts: 2
Joined: Sat Jan 07, 2006 7:20 am

Post by Corobori »

The ASPX part is not a problem, I am handling this part.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

GET variables.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I believe the use of cURL would be the best approach to this. Simply cURL your data to the website and capture any content that is generated.
Post Reply