CGI Script to GET HTTP URL string

Posted on 2008-11-12
Last Modified: 2013-12-25
I need a simple script to GET HTTP URL string variables and then to post them to another URL.

Lets call variable on string

Post to

Can someone point me in the right direction?
Question by:3rdLifeWebDev
    LVL 39

    Expert Comment

    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 = '';
    my $page = get($URLString);
    #now $page contains the content from the url

    Open in new window


    Author Comment

    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.


    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.
    LVL 39

    Accepted Solution

    So yo need two separate scripts written?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
    If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now