Ip Nd Browser Detection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ip Nd Browser Detection

    Here is the code for gettin ip nd browser used in chat script m using :-
    Code:
    case 'agent';
    if($login['moder']>=3) {
    $q = @mysql_query("select * from `".$px.$utable."` where id='$whoid';");
    $dbuser = @mysql_fetch_array($q);
    $q = @mysql_query("select * from `".$px.$utable."` where id='$whoid';");
    $dbuser = @mysql_fetch_array($q);
    print "[b]Ip:[/b]
    ".$dbuser['ip']."
    ";
    print "[b]Remote Ip:[/b]
    ".$dbuser['rip']."
    ";
    print "[b]Headers:[/b]
    ".$dbuser['url']."
    ";
    print "[b]Browser:[/b]
    ".$dbuser['soft']."
    "; }
    else print $lang['access_denied'];
    
    break;
    This shows ip nd browser of login registration time tht is stored in database i want to see current ip of users i tryed many things nothing works pls help thnx .

    #2
    What Script u using m8 ?
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      Its Cz script only for chat

      Comment


        #4
        do you see the last IP @ database? if YES , this is not current ip?
        http://ngeo.ro

        Comment


          #5
          Bro Ip i see is wht user had at the registration time it dont change even if user has changed his mobile nd ip the same ip shows wht is saved in database at the registration time ....

          Comment


            #6
            i know what you want, i know what to do, but i dont know ...the script and your database LOLZ
            http://ngeo.ro

            Comment


              #7
              ok bro here is database nd script is chatzone one shud i uplooad it here ?
              sql tables
              Code:
              -- Table structure for table `chat_ignor`
              -- 
              
              CREATE TABLE `chat_ignor` (
                `id` int(11) NOT NULL auto_increment,
                `loginid` int(11) NOT NULL default '0',
                `user` text NOT NULL,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_ignor`
              -- 
              
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_letters`
              -- 
              
              CREATE TABLE `chat_letters` (
                `id` int(11) NOT NULL auto_increment,
                `from_user` text NOT NULL,
                `to_user` text NOT NULL,
                `subject` text,
                `letter` text NOT NULL,
                `time` text NOT NULL,
                `new` int(11) default NULL,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_letters`
              -- 
              
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_meets`
              -- 
              
              CREATE TABLE `chat_meets` (
                `id` int(11) NOT NULL auto_increment,
                `login` text NOT NULL,
                `title` text NOT NULL,
                `content` text NOT NULL,
                `organizatory` text NOT NULL,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_meets`
              -- 
              
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_messages`
              -- 
              
              CREATE TABLE `chat_messages` (
                `id` int(11) NOT NULL auto_increment,
                `login` text NOT NULL,
                `msg` text NOT NULL,
                `pr_from` text,
                `pr_to` text,
                `time` text NOT NULL,
                `room` text,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_messages`
              -- 
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_ques`
              -- 
              
              CREATE TABLE `chat_ques` (
                `id` int(11) NOT NULL auto_increment,
                `vopros` text NOT NULL,
                `otvet` text NOT NULL,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_ques`
              -- 
              
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_settings`
              -- 
              
              CREATE TABLE `chat_settings` (
                `id` int(11) NOT NULL auto_increment,
                `mod` text,
                `var` text,
                `val1` text,
                `val2` text,
                `val3` int(11) default '0',
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;
              
              -- 
              -- Dumping data for table `chat_settings`
              -- 
              
              INSERT INTO `chat_settings` VALUES (1, 'room', 'room1', 'Main', 'Main', 0);
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_users`
              -- 
              
              CREATE TABLE `chat_users` (
                `id` int(11) NOT NULL auto_increment,
                `login` text NOT NULL,
                `pass` text NOT NULL,
                `name` text NOT NULL,
                `sex` text NOT NULL,
                `bday` int(11) default '0',
                `bmonth` int(11) default '0',
                `byear` int(11) default '0',
                `photo` text,
                `live` text,
                `mobile` text,
                `operator` text,
                `email` text,
                `wapsite` text,
                `website` text,
                `icq` int(11) default '0',
                `about` text,
                `status` text,
                `posts` int(11) NOT NULL default '0',
                `vposts` int(11) NOT NULL default '0',
                `nmsgs` int(11) default '0',
                `tupdate` int(11) default '0',
                `fsize` text,
                `ban` text,
                `breason` text,
                `btime` text,
                `room` text,
                `moder` int(11) default '0',
                `admin` int(11) default '0',
                `rtime` int(11) NOT NULL default '0',
                `ltime` int(11) NOT NULL default '0',
                `ip` text,
                `soft` text,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_users`
              --
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chat_vict`
              -- 
              
              CREATE TABLE `chat_vict` (
                `id` int(11) NOT NULL auto_increment,
                `login` text NOT NULL,
                `msg` text NOT NULL,
                `pr_from` text,
                `pr_to` text,
                `vopros` text,
                `answered` text,
                `time` text NOT NULL,
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chat_vict`
              -- 
              
              
              -- --------------------------------------------------------
              
              -- 
              -- Table structure for table `chatlog`
              -- 
              
              CREATE TABLE `chatlog` (
                `id` int(10) NOT NULL auto_increment,
                `date` varchar(99) NOT NULL default '',
                `text` varchar(255) NOT NULL default '',
                PRIMARY KEY  (`id`)
              ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
              
              -- 
              -- Dumping data for table `chatlog`
              --

              Comment


                #8
                i have found out the code for gettin it done pls can u ppls modify this code so it updates old ip nd soft wid new one correctly cos this dont seem to be working pls chk :-
                Code:
                if($login) {
                    if(!$login['ip']) { @mysql_query("update `".$px.$utable."` set `ip`='".getenv(REMOTE_ADDR)."' where `id`='".$id."';"); }
                    if(!$login['soft']) { @mysql_query("update `".$px.$utable."` set `soft`='".getenv(HTTP_USER_AGENT)."' where `id`='".$id."';"); }

                Comment


                  #9
                  that code should auto update its self mate

                  Comment


                    #10
                    Tht i kno but its not doin so is it probably cos m on free server ? or if u have any effective coding for this pls give me

                    Comment


                      #11
                      Here is a code, replace the code you posted above with this one.
                      Code:
                      if($login) @mysql_query("update `".$px.$utable."` set `ip`='".getenv(REMOTE_ADDR)."', `soft`='".getenv(HTTP_USER_AGENT)."' where `id`='".$id."';");
                      Advertise your mobile site for FREE with AdTwirl

                      Comment


                        #12
                        Thx Millions Gumslone bro the code is workin properly now ..... it was jst missing a { after if($login) ...

                        Comment


                          #13
                          try that code ... if you still face problem.. please ask.. here.. i will surely help you.. will post a new user php... its simple to replace.../// thanx gum...old script having same script...

                          Comment


                            #14
                            hero jst post the code wht u have nd tht code isnt of user.php but enter.php wht Gumslone gave nd wht i posted is in old script .

                            Comment

                            Working...
                            X