Solved

Background script

Posted on 1997-03-21
1
205 Views
Last Modified: 2013-12-25
How can I run a CGI script in the background.  Meaning not have a page displayed. I want to send the script some data,
have it do something and depending on the result, bring up one of two pages.  

Right now the only way I can do it is have the form execute the script. The script does it's thing and then writes a page saying it was successful or not.  I have a meta tag in the script which executes the next page after 1 second.  I would like to skip the message in between part.  

Hope I have explained this well.
0
Comment
Question by:wspoulin
1 Comment
 
LVL 4

Accepted Solution

by:
furu earned 100 total points
ID: 1827774
What you need to do is output
Location: http://www.domain.com/file.html
as the header. That is instead of
Content-Type: text/html

An example:
---------------------------
#!user/bin/perl  
if (condition 1) {
 print "Location: http://www.domain.com/file1.html\n\n";
}
elsif (condition 2) {
 print "Location: http://www.domain.com/file2.html\n\n";
}
else {
 print "Location: http://www.domain.com/error.html\n\n";
}
------------------------------------------------------------
 HTH
 

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

831 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