Ip history code

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

    Ip history code

    Hey guys...lets say a member signs up twice on my site with same ip and i click on the ip and could see both profiles linked to it then they decide to change ip address for one profile. Is there any way or code to show the history of ip addresses changed or used for a profile so i can see if they are linked to more profiles?

    #2

    do this..
    the login page put this:
    $idn = mysql_real_escape_string(getuid_nick($uid));
    $v=HTML;
    $tm=time();
    $brws = explode(" /",$_SERVER['HTTP_USER_AGENT']);
    $browser = $brws[0];
    $ubr = $browser;
    $uip = getip();
    mysql_query("INSERT INTO batica_logovanje SET who='".$idn."',ver='".$v."', ltime='".time()."', pretrazivac='".$ubr."', adresa='".$uip."',original2='".$_SERVER['HTTP_X_OPERAMINI_PHONE_UA']."',original3='".$_SERVER['HTTP_X_DEVICE_USER_AGENT']."',original4='".$_SERVER['HTTP_X_ORIGINAL_USER_AGENT']."',original5='".$_SERVER['HTTP_X_SKYFIRE_PHONE']."',original6='".$_SERVER['HTTP_X_BOLT_PHONE_UA']."',original7='".$_SERVER['HTTP_DEVICE_STOCK_UA']."',original8='".$_SERVER['HTTP_X_UCBROWSER_DEVICE_UA']."',original9='".$_SERVER['HTTP_X_NOKIA_IPADDRESS']."',original10='".$_SERVER['HTTP_PROFILE']."'"); ================== add sql table ==================
    CREATE TABLE `batica_logovanje` (
    `who` varchar(20) COLLATE latin1_general_ci NOT NULL,
    `id` int(100) NOT NULL,
    `ltime` int(100) NOT NULL DEFAULT '0',
    `pretrazivac` text COLLATE latin1_general_ci NOT NULL,
    `adresa` varchar(20) COLLATE latin1_general_ci NOT NULL,
    `ver` text COLLATE latin1_general_ci NOT NULL,
    `device` text COLLATE latin1_general_ci NOT NULL,
    `original2` text COLLATE latin1_general_ci NOT NULL,
    `original3` text COLLATE latin1_general_ci NOT NULL,
    `original4` text COLLATE latin1_general_ci NOT NULL,
    `original5` text COLLATE latin1_general_ci NOT NULL,
    `original6` text COLLATE latin1_general_ci NOT NULL,
    `original7` text COLLATE latin1_general_ci NOT NULL,
    `original8` text COLLATE latin1_general_ci NOT NULL,
    `original9` text COLLATE latin1_general_ci NOT NULL,
    `original10` text COLLATE latin1_general_ci NOT NULL,
    `original11` text COLLATE latin1_general_ci NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
    Last edited by srecnica; 07.06.17, 18:25.
    sigpichttp://happy.srecnica.com/web

    Comment


      #3
      create php file:


      $who= mysql_real_escape_string($_GET["who"]);
      $whonick = mysql_real_escape_string(getnick_uid($who));
      $who1=getuid_nick($who);
      $whonick1 = getnick_uid($who1);
      $todel = $who1;
      $nopl = mysql_fetch_array(mysql_query("SELECT email FROM users WHERE id='".$who."'"));
      echo "<b>Nick:</b> $whonick<br/>";
      echo "<b>ID broj: $who </b><br/>";
      echo "<b>E-Mail: $nopl[0]</b><br/>";
      if($page=="" || $page<=0)$page=1;
      $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM logovanje WHERE who='".$who."'"));
      $num_items = $noi[0]; //changable
      $items_per_page= 10;
      $num_pages = ceil($num_items/$items_per_page);
      if(($page>$num_pages)&&$page!=1)$page= $num_pages;
      $limit_start = ($page-1)*$items_per_page;
      $sql= "SELECT id, who, pretrazivac, adresa, ltime,ver,device,original2,original3,original4,ori ginal5,original6,original7,original8,original9,ori ginal10 FROM batica_logovanje WHERE who='".$who."'ORDER BY ltime DESC LIMIT $limit_start, $items_per_page";
      $items = mysql_query($sql);
      echo mysql_error();

      while ($row = mysql_fetch_array($items))
      {
      $a = getuid_nick($row[1]);


      $newtime =$row[4];
      echo " <small><b>Log: $row[6] ($row[5])-Vreme:".date("d.m.Y - H:i:s",$newtime)."</b><br/>";echo "Browser: - $row[2]<br/> ";

      echo "IP: $row[3]</a> <br/>";

      if($row[6]) {
      echo "<b>Original Browser( ako udje operom mini ):</b><br/>";
      echo "$row[6] <br/>";
      }

      if($row[13]){

      echo "<b>UC Browser( ako udje operom mini ):</b><br/>";
      echo "$row[13] <br/>";


      }
      if($row[14]){

      echo "<b>Original Browser( ako udje operom mini ):</b><br/>";
      echo "$row[14] <br/>";


      }
      if($row[15]){

      echo "<b>HTTP profil( ako udje operom mini ):</b><br/>";
      echo "$row[15] <br/>";


      }






      Last edited by srecnica; 07.06.17, 18:41.
      sigpichttp://happy.srecnica.com/web

      Comment

      Working...
      X