Before PHP 4 came out, I needed to branch to a page from within the code (I know you can now cache the page). So, I have many applications out there using my POST version which has work flawlessly. Then I decided that in some cases, I would like to use the GET (saves me checking to see if the variables are either POST or GET).
Here is how I call the POST and GETS. The use of "bounce" comes from my experience using WebHub, an NT based system for high performance.
/* Bounce to a page using POST */
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);
};
}
/* Bounce to a page using GET */
function bounce_get($server, $path, $url, $page, $info) {
$http = new http;
$fp = $http->http_fget($server, $path . $page, $info);
if($fp) {
print '<BASE HREF="' . $url . $page . '"><p>';
fpassthru($fp);
};
}
Chris Shiflett wrote:
Your request looks fine. What are you doing with $query once you have constructed it?Another question worth asking is what is your ultimate goal here? I'm not sure performing a manual request is necessary, but maybe it is. Chris --- Todd Cary <[EMAIL PROTECTED]> wrote:# now we build our query $query = "GET $abs_url" . "HTTP/1.0\r\n" . "Accept-Language: en-us\r\n". "Host: $host:$port\r\n". "Connection: close\r\n";
--