Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 757771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:24:07+00:00 2026-05-14T15:24:07+00:00

I am working with a site that uses an outside source to work with

  • 0

I am working with a site that uses an outside source to work with payment transactions, one of the prerequisites is that on success a CGI script is called.

What I am wanting to know is it possible to do a redirect to a PHP page with the CGI script and have the PHP detect that it has been loaded via a Perl redirect, I currently have this is in my Perl.

#!/usr/bin/perl
#
# fixedredir.cgi

use strict;
use warnings;


my $URL = "http://www.example.com/";

Location: $URL;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:24:07+00:00Added an answer on May 14, 2026 at 3:24 pm

    The standard way to do CGI programming in Perl is using the CGI.pm module.
    A redirect can be coded like this (not sure about the syntax).

     #!/usr/bin/perl
    
     use strict;
     use warnings;
     use CGI;
    
     my $URL = "http://www.example.com/";
    
     print CGI::redirect($URL); 
    

    I does not matter if the target page is PHP or whatever.

    The other page can’t know for sure if it came from a “perl redirect” (actually the concept is rather absurd). If you have control over the other PHP page, you can set some convention and pass a parameter in the query string.

     my $URL = "http://www.example.com/x.php?redirectFromPerl=1";
    

    Update : As others have commented, the question really makes little sense – and some statements (“on success a CGI script is called”) suggest some basic misunderstandings about the basics of dynamic web pages and CGI. My example code shows how to make a redirect in Perl CGI, but it’s probable that the original question (and hence the answer) is inadequate for the real scenario.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The site that I am working on is at a remote server. I want
I'm working on a site now that have to fetch users feeds. But how
I have a relatively simple site that I'm working up for an intranet environment.
I have a site that I am currently working on in ASP.NET 2.0 using
I am working on an MVC site that is the first my company has
I have an old ASP.NET 1.1 site that I am maintaining. We are working
I am working on a site and working on a component that will take
I'm developing a site right now that I've been working on for more than
A site I am working on that is built using PHP is sometimes showing
So I've got a hobby site I'm working on. I've got items that are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.