Re: header() vs. fsockopen for "Location: http:www.d.com"....

From: Date: Thu, 18 Mar 2004 01:15:38 +0000
Subject: Re: header() vs. fsockopen for "Location: http:www.d.com"....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-180774@lists.php.net to get a copy of this message
Hi Scott, This has been heavily discussed in recent weeks you will find lots of pointers in the archives. But in short there's no harm in header("Location:"); Scott Fletcher wrote:
Hi! Let's say there are 3 webpages with webpage #1 for customer filling out the form and submit it to webpage #2 for processing and database insert/update then php header("Location: http://www.whatever.com") to redirect the webapge to webpage #3. (or back to webpage #1). That way, the web-browser doesn't have a history of webpage #2, so the database is immune to browser's refresh/back/forward button (from database duplication). Now I have people telling me that it is not healthy to use the header("Location: blah blah") to force the web browser to redirect and that I should use the fsockopen instead. A fsockopen on webpage #2 on the Apache's side where PHP can open a port to send a request to apache to have it to send a webpage #3 to the web browser. That sound okay to me but I see one big problem. If fsockopen is used on webpage #2 to emulate a webpage #3 then the web browser only see webpage #2 and webpage #3 together as webpage #2. I see no idea workaround to it, in fact there is none. So, it look like I have to stick to header("Location: blah blah"). So, what is your thought and opinion. If there is a workaround them I'm all ear!. FletchSOD
-- Raditha Dissanayake. --------------------------------------------------------------- http://www.radinks.com/upload/ Drag and Drop Upload thousands of files and folders in a single transfer. (HTTP or FTP)

« previous php.general (#180774) next »