isn't this what a session.inc is for? There you won't have drupal_http_request, but you could include the file (common.inc?) or you could use curl? I brought this up here as well for bakery: http://drupal.org/node/574084



Message: 3
Date: Mon, 15 Mar 2010 23:28:34 +0100
From: "Daniel F. Kudwien" <news@unleashedmind.com>
Subject: Re: [development] Hook_init issue
To: <development@drupal.org>
Message-ID: <00f101cac48e$d9beca00$0200a8c0@structworks.com>
Content-Type: text/plain;       charset="us-ascii"


function crazyauth_boot() {
 require_once './includes/common.inc';
 drupal_http_request(...);
}


________________________________

       From: development-bounces@drupal.org
[mailto:development-bounces@drupal.org] On Behalf Of nan wich
       Sent: Monday, March 15, 2010 11:23 PM
       To: development
       Subject: [development] Hook_init issue


       It's back to the drawing board...

       I have a module that uses hook_init to check for the presence of a
particular cookie. If it is there, then I call an external authentication
server (this is mandatory at this customer). This all works fine until...

       We turn page caching on and all of a sudden, no more hook_init.
Okay, read the fine print and it says that's what is supposed to happen.

       So I switched to hook_boot. Well, apparently is does excute, but the
drupal_http_request in the authentication function says there is no such
animal.

       We would really like to turn caching on, but we must have this
authentication check too. For the moment we can turn caching off, but one
week into the site and we are already taxing the server with traffic.

       Options?


       Nancy E. Wichmann, PMP

       Injustice anywhere is a threat to justice everywhere. -- Dr. Martin
L. King, Jr.

--
Scott Reynolds