Jump to content


Photo

Exchange variables between servers


  • Please log in to reply
2 replies to this topic

#1 steinarasb

steinarasb
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationOslo, Norway

Posted 08 May 2006 - 08:47 AM

I have to servers, the main server(server1) is PHP4(/FreeBSD) and MySQL4, the second(server2) is PHP5(/SUSE) and MySQL5.
The reason I use PHP5 and Mysql5 on the second server is that i need to use "stored procedures".
Server1 runs my webpage. So what i need to do is: From a function on server1, I need to call a script on server2, and have this script to return an array or a string to server1.
For now i call the script on server2 from server1 (include "http://server2.com/script.php") and it executes the queries correctly, it can also give me output in the webbrowser (i.e. I "echo" the variable in the script on server2). But i can not get the script to return any variables to server1.

Anyone?

Thanks in advance.
To Alcohol - the cause of and solution to all of life's problems

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 08 May 2006 - 02:05 PM

Once the script executes on server 2, can you do a header redirect back to server 1 with the variables in the URL?

Info: PHP Manual


#3 steinarasb

steinarasb
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationOslo, Norway

Posted 09 May 2006 - 10:35 AM

[!--quoteo(post=372265:date=May 8 2006, 09:05 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 8 2006, 09:05 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Once the script executes on server 2, can you do a header redirect back to server 1 with the variables in the URL?
[/quote]
Can't see how that would be possible in my situation. But in some cases it might work out?
Thanks anyway :)

Anyone who is interessted can check out this link:
[a href=\"http://www.phpbuilder.com/board/showthread.php?t=10322790\" target=\"_blank\"]http://www.phpbuilder.com/board/showthread.php?t=10322790[/a]

To Alcohol - the cause of and solution to all of life's problems




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users