Substitute for getenv() when using ISAPI ??

From: Date: Sun, 27 Jan 2002 21:47:03 +0000
Subject: Substitute for getenv() when using ISAPI ??
Groups: php.general 
Request: Send a blank email to php-general+get-82321@lists.php.net to get a copy of this message
Hi there! Sorry for posting this again, but I got no answers... Does anybody know a replacement for the built-in getenv()-function, since according to the manual it's not supported, when running as an ISAPI-module under Internet Information Server 5.0 on Windows 2k Professional. I've created a small counter that looks up the user's IP in a database in order to prevent duplicate hits when user is reloding the page and to track how many users are "currently online". Suggestions welcome.... BTW, this is the code I'm using now (temporarily running the CGI version): === CUT HERE === // ... // Get user's IP and user agent (-->>> problem arises here <<<--) $ip = ip2long(($tmp = getenv("HTTP_X_FORWARD_FOR")) ? $tmp : getenv("REMOTE_ADDR")); // -->>> and here <<<-- $useragent = getenv("HTTP_USER_AGENT"); // Check if visit already counted $id = 0; $counted = false; $r = mysql_query("SELECT visitor.id, visitor.ip, visitor.useragent, visits.timestamp FROM visitor, visits WHERE visitor.id = visits.visitor_id ORDER BY visitor.id DESC"); // ... === CUT HERE === Christian Blichmann _____________________________________________ don't hesitate - email me with your thoughts: e-mail: feedback.nospam@blichmann.de - please remove the ".nospam" from address. _____________________________________________ do you want to know more? web: http://www.blichmann.de

« previous php.general (#82321) next »