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

From: Date: Wed, 17 Mar 2004 17:36:12 +0000
Subject: header() vs. fsockopen for "Location: http:www.d.com"....
Groups: php.general 
Request: Send a blank email to php-general+get-180713@lists.php.net to get a copy of this message
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

« previous php.general (#180713) next »