Hello team
CREATE TABLE stats (
id_stat bigint(5) NOT NULL auto_increment,
vis_ip varchar(15) NOT NULL default '',
vis_agent varchar(80) NOT NULL default '',
vis_lang char(2) NOT NULL default '',
vis_ref varchar(192) NOT NULL default '',
vis_time datetime NOT NULL default '0000-00-00
00:00:00',
vis_url varchar(96) NOT NULL default '',
PRIMARY KEY (id_stat)
) TYPE=MyISAM AUTO_INCREMENT=1720 ;
I have the upper table created on both my pc with IIS and at ipowerweb.
I am having a peroblem with using $_SERVER['REQUEST_URI']in script
placed on the server of ipowerweb. I do not have a problem on my local
machine. ipowerweb service is with windows. I do not understand. My
search have led me to belive I can not use $_SERVER['REQUEST_URI'] on a
windows IIS server unless the following is implimented
if (!isset($SERVER['REQUEST_URI'])) {
$SERVER['REQUEST_URI'] = $SERVER['SCRIPT_NAME'];
if (isset($SERVER['QUERY_STRING'])) {
$SERVER['REQUEST_URI'] .= '?' . $SERVER['QUERY_STRING'];
}
}
The code I have on both my machine and on ipowerweb
<?PHP
mysql_query
(
"insert into stats
(
vis_ip,
vis_agent,
vis_lang,
vis_ref,
vis_time,
vis_url
)
values
('".$SERVER['REMOTE_ADDR']."',
'".$SERVER['HTTP_USER_AGENT']."',
'".$SERVER['HTTP_ACCEPT_LANGUAGE']."',
'".$SERVER['HTTP_REFERER']."',
NOW(),
'".$_SERVER['REQUEST_URI']."'
)"
);
?>
Thanks
Tom