Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 888
  • Last Modified:

CGI Script to GET HTTP URL string

I need a simple script to GET HTTP URL string variables and then to post them to another URL.

Lets call variable on string www.mysite.com/cgi-bin?Firstname=FName

Post to www.mysite2.com/form.htm?FName=Fred

Can someone point me in the right direction?
0
3rdLifeWebDev
Asked:
3rdLifeWebDev
  • 2
1 Solution
 
Adam314Commented:
I'm not real clear what you are asking, but if you want a script that will get the page from the url:

use LWP::Simple;
my $URLString = 'www.mysite.com/cgi-bin?Firstname=FName';
my $page = get($URLString);
#now $page contains the content from the url

Open in new window

0
 
3rdLifeWebDevAuthor Commented:
I am using POST HTTP from my 3rd party server to post to my cgi-bin file. I need the script set there to get it, and then post it to another URL, which will host a page that will take the string and submit it via form action to another 3rd party host.

So..

Step 1:  Shopping cart via silent post http to cgi-bin.

Step 2: Cgi-bin receives(need script) to pass variables back out(need script)  to webpage that contains form variable fields via URL.

Step 3: Webpage then passes form data onload.

Step 3 is built...done....Step 1 is automation upon a successful purchase....I need Step 2 .

Thanks for the reply.
0
 
Adam314Commented:
So yo need two separate scripts written?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now