Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
|
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 17th, 2006, 02:47 AM
Registered User
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rungss Send a message via Yahoo to rungss
Default Redirecting while keeping the file processing

Hi,
Is there any way so that the file keeps on processing even when the user is redirected.

The php manual recommends using the following for redirecting


<?php
header("Location: http://www.example.com/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

I acually have the following requirement.
Suppose I need to send an Email which can take a few seconds.
I want to redirect the user to a different Location without stopping the execution of the code.


 
Old February 21st, 2006, 09:31 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Cache the script:
ob_start() and ob_end_flush()

Regards,





`~@#\^%&*/\.<.\/-|+|_!:;..=?>
mediasworks.com project
 
Old February 25th, 2006, 12:52 AM
Authorized User
 
Join Date: Jan 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi(Assalamo Aliekum),

      It is good to user header("Location: index.php"); method but whit using this, u cant use session_start();, i have used this session_start() with header() but the sessions did not work, is there any possibilty to use header() and session_start();

We need this concept when v use login authentication, if authenticated setting a session varible and redirecting to the next page.
Is there any solution.

Thanks.
Asif Arif






Similar Threads
Thread Thread Starter Forum Replies Last Post
Text file importing & data processing jarpola Excel VBA 0 January 16th, 2007 10:27 AM
Speeding up processing time on ASP file sswingle Classic ASP Databases 2 April 14th, 2006 04:51 AM
Processing text file from Oracle in Excel Macsinging Excel VBA 2 November 23rd, 2005 03:53 PM
How to Read,Write, & Save (File Processing) ck C++ Programming 2 April 18th, 2005 07:28 AM
How to Read,Write, & Save (File Processing) ck Visual C++ 1 January 23rd, 2005 02:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.