Branching to a page
| From: | Todd Cary | Date: | Mon, 15 Sep 2003 03:30:27 +0000 |
| Subject: | Branching to a page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162595@lists.php.net to get a copy of this message | ||
Back in the earlier days of PHP, pages were not cached so I developed a method of "branching to a page" by opening a new socket. Since it has worked over the years in quite a variety of applications, I have not changed...but maybe I should. Are there any glaring deficiencies with doing this:
// Verify the Session ID
if ($session_id) {
...
} else {
bounce_post($server, $path, $url, "abort.php", "");
exit;
}
Where "bounce" is defined as
function bounce_post($server, $path, $url, $page, $info) {
$http = new http;
$fp = $http->http_fpost($server, $path . $page, $info);
if($fp) {
print '<BASE HREF="' . $url . $page . '"><p>';
fpassthru($fp);
};
}
Todd
--