473,408 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Transferring variables between seperate hosts

This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does
not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark



Jul 17 '05 #1
9 1455
Yes, it's possible. In the form tag of the PHP/HTML page on server1,
define the action value as URL to the second server, like this:

<form action="http://server2.com/process.cgi">

That's it...or did I misunderstand the question?

-Sauli Karhu

Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does
not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark



Jul 17 '05 #2
Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does
not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark


The answer to your question is "it depends".

Can you show us the relevant code snipettes and any error messages being
produced and a brief description of what you are trying to accomplish. There is
always more than one way to achieve the same outcome - and being a "newbie",
you may have picked the most difficult solution :)

--
Michael Austin.
Consultant - Available.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)
Jul 17 '05 #3
Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl?


1) The usual way of sending variable values from a PHP (or even a plain HTML)
page to the browser is by using a <FORM> tag and several <INPUT> tags.

2) The browser can respond to the ACTION= part of the <FORM> tag and
send modified, unmodified, or hidden values to the target server.

3) CGI programs written in any language can parse input from the POSTed
form and use the values.

Get the third step working first. Then it should be trivial to do
the first step.
-Joe
Jul 17 '05 #4
If you post some code, we can disect it a bit. I would start by getting a
simple version working. As someone already suggested, get the parsing in
perl down first. Then point your php page in the direction of the perl
script and you should be in business. I would make the first perl script
just parse and print out the variable just so you know it got there. Heck,
you can even get the perl script to write more php code for you if you want.
Fun stuff - maybe sloppy, but fun.

Shane
"Mark" <no*******@fakoaddresso.como> wrote in message
news:MJ*******************@fe2.news.blueyonder.co. uk...
This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does
not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark


Jul 17 '05 #5
No you didn't misunderstand as that's pretty much how I understand the
process of HTTP - the POST variables are just stored in the HTTP
headers in a platform-independant way so it shouldn't really matter.
I just don't seem to be able to display them in my page using Perl.

Probably a problem with my Perl code which I just copied
from an web tutorial!

Mark

"Sauli Karhu" <sa*********@nospam-saunalahti.fi> wrote in message
news:aA*****************@reader1.news.jippii.net.. .
Yes, it's possible. In the form tag of the PHP/HTML page on server1,
define the action value as URL to the second server, like this:

<form action="http://server2.com/process.cgi">

That's it...or did I misunderstand the question?

-Sauli Karhu

Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark




Jul 17 '05 #6

"Michael Austin" wrote
Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark

The answer to your question is "it depends".

Can you show us the relevant code snipettes and any error messages being
produced and a brief description of what you are trying to accomplish.

There is always more than one way to achieve the same outcome - and being a "newbie", you may have picked the most difficult solution :)

Michael Austin.
Consultant - Available.
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)


I say "newbie" but I am more a newbie in Perl than PHP. While I am sure I
understand the process of POST data in HTTP headers (and my forms pass their
data quite happily between PHP pages) I suspect I am just not using Perl
correctly to display the variables. So long as I know that there is no
theoretical reason why it can't be done I will continue working on my Perl
code.

I may post a separate question about this in the Perl newsgroup as soem are
reading this thread in comp.lang.php.

Thanks
Mark.


Jul 17 '05 #7
Thanks. I suspect my Perl code so I will work on it as you suggest and post
to comp.lang.perl if I have any more problems. Thansk again.

Mark

"ZafT" <bu**@inhell.com> wrote in message
news:mL********************@comcast.com...
If you post some code, we can disect it a bit. I would start by getting a
simple version working. As someone already suggested, get the parsing in
perl down first. Then point your php page in the direction of the perl
script and you should be in business. I would make the first perl script
just parse and print out the variable just so you know it got there. Heck, you can even get the perl script to write more php code for you if you want. Fun stuff - maybe sloppy, but fun.

Shane
"Mark" <no*******@fakoaddresso.como> wrote in message
news:MJ*******************@fe2.news.blueyonder.co. uk...
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does not seem to work at the moment although I am sure it is not a scripting
error at this stage

(Any newbie-level explanations welcomed!!)

Thanks
Mark



Jul 17 '05 #8

"Joe Smith" wrote
Mark wrote:
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl?
1) The usual way of sending variable values from a PHP (or even a plain

HTML) page to the browser is by using a <FORM> tag and several <INPUT> tags.

2) The browser can respond to the ACTION= part of the <FORM> tag and
send modified, unmodified, or hidden values to the target server.

3) CGI programs written in any language can parse input from the POSTed
form and use the values.

Get the third step working first. Then it should be trivial to do
the first step.
-Joe


Thanks - will do. I suspect my Perl code so I will work on it as you suggest
and post to comp.lang.perl if I have any more problems.

Thanks.

Mark
Jul 17 '05 #9
>This may be a dumb question but can you tranfer variables stored in a PHP
page on one server to a page on a different server via a form POST and be
able to access those variables on the new page using Perl? From my
understanding of HTTP I can't see why this should be a problem but it does
not seem to work at the moment although I am sure it is not a scripting
error at this stage


Post your code so we can see if/where you're going wrong.

Regards,
Chris
Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Abby | last post by:
I have an application that is written in php/mysql on a Linux platform and need to transfer hosts. This is a session based application and I don't know a lot about php/Linux/mysql, but can get by....
10
by: Mark | last post by:
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page...
5
by: Tony Archer | last post by:
Ok, first I know there are some db ways around this BUT I'll ask it anyhow: I have a couple ASP applications running on my server (non .NET) I would like to be able to get a sum total of how...
0
by: Karl Rhodes | last post by:
Ok, we think we have a problem which SHOULD be simple to resolve but appears to be impossible (unless we're not as good as we thought we were!!!) We have seperate workstations on which we do our...
2
by: ryan.d.rembaum | last post by:
Hello, I am trying to build a standardized login screen that several different web application could use. What I would like is for the login screen to detect where the user has come from. ...
42
by: Dooglo | last post by:
I'm new VB and programming all together, but I'm getting he hang of it. My question is; I'm writting a program to figure square feet and yards when the user inputs "Length in feet and inch (...
15
by: http://www.visual-basic-data-mining.net/forum | last post by:
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2..... That means after i fill in any data in textBox1 and click Next button... It will bring me to...
4
by: Marc E | last post by:
All, I'm coming from java and coldfusion, where one can set a "global" variable in one place (the servletcontext in java, Application.cfm in coldfusion) and all files in that site can then take...
2
by: garther | last post by:
Hi I'm trying to get something like this to work: Application calculates data and stores them in local SQL server. Once a week this data needs to copied to DVD. Then I need second application...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.