{"id":211953,"date":"2014-02-09T16:38:03","date_gmt":"2014-02-09T12:38:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=211953"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=211953","title":{"rendered":"<span class=\"post_title\">\u00ab\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043f\u043e ip\u00bb<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0432\u0435\u0440\u044f\u0442 \u0432 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 (\u044f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e \u043f\u0440\u043e \u0445\u0430\u0431\u0440\u0430\u0436\u0438\u0442\u0435\u043b\u0435\u0439:) ). \u041c\u043d\u043e\u0433\u0438\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e <a href=\"http:\/\/img.2ip.ru\/ooops.jpg\">img.2ip.ru\/ooops.jpg<\/a> \u043f\u0440\u0430\u0432\u0434\u0430 \u0443\u0437\u043d\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043d \u0440\u0435\u0434\u0435\u0440\u0435\u043a\u0442\u0438\u0442 \u043d\u0430 \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e\u00bb \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u0418 \u0442\u0430\u043a, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c ip \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0435\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435<a name=\"habracut\"><\/a>:  <\/p>\n<pre><code class=\"php\"> $from = $_SERVER['HTTP_REFERER']; \/\/\u041e\u0442\u043a\u0443\u0434\u0430 \u043d\u0430 \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0435\u0440\u0435\u0448\u0451\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c  if ( stristr($_SERVER['HTTP_USER_AGENT'], 'Firefox') ) $browser = &quot;MozillaFirefox&quot;; \/\/\u0431\u0440\u0430\u0443\u0437\u0435\u0440   elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'YaBrowser') ) $browser = &quot;YandexBrowser&quot;;   elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'Chrome') ) $browser = &quot;Google Chrome&quot;;   elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) $browser = &quot;Safari&quot;;   elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'Opera') ) $browser = &quot;Opera&quot;;   elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'Mail') ) $browser = &quot;MailRuBrowser&quot;;     elseif ( stristr($_SERVER['HTTP_USER_AGENT'], 'AppleWebKit') ) $browser = &quot;Mobile&quot;;   $ip = $_SERVER['REMOTE_ADDR'];   $spy_user = substr($_SERVER['QUERY_STRING'], 0, -4); \/\/ http:\/\/\u043d\u0430\u0448_\u0441\u0430\u0439\u0442.\u0434\u043e\u043c\u0435\u043d0\u043b\u0432\u043b\/\u043d\u0430\u0448\u0430_\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430.php?&lt;\u0412\u041e\u0422 \u042d\u0422\u041e \u0411\u0423\u0414\u0415\u0422 \u041f\u041e\u041c\u0415\u0429\u0415\u041d\u041e \u0421\u042e\u0414\u0430&gt;.gif. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u0441\u044b\u043b\u0430\u043b\u0438 &quot;\u0441\u0432\u043e\u044e&quot; \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0441\u043b\u0430\u043b &quot;\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443&quot; \u043f\u0435\u0440\u0435\u0448\u0435\u0434\u0448\u0435\u043c\u0443 \u0441\u044e\u0434\u0430  function get_os($user_agent)  \/\/\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0438  {     $oses = array (      'Windows 95' =&gt; '(Windows 95)|(Win95)|(Windows_95)',      'Windows 98' =&gt; '(Windows 98)|(Win98)',      'Windows 2000' =&gt; '(Windows NT 5.0)|(Windows 2000)',      'Windows XP' =&gt; '(Windows NT 5.1)|(Windows XP)',      'Windows 2003' =&gt; '(Windows NT 5.2)',    'Windows 7' =&gt; '(Windows NT 6.1)',      'Windows ME' =&gt; 'Windows ME',      'Open BSD'=&gt;'OpenBSD',      'Sun OS'=&gt;'SunOS',      'Linux'=&gt;'(Linux)|(X11)',      'Macintosh'=&gt;'(Mac_PowerPC)|(Macintosh)',      'QNX'=&gt;'QNX',      'BeOS'=&gt;'BeOS',      'OS\/2'=&gt;'OS\/2',    'iOS'=&gt;'iOS',    'Android'=&gt;'Android',    'Search Bot'=&gt;'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp\/cat)|(msnbot)|(ia_archiver)'     );            foreach($oses as $key=&gt;$value)       {           if (preg_match('#'.$value.'#i', $user_agent))               return $key;       }   return 'Unknown';    }  if(!(isset($from))) $from = &quot;Unknown&quot;;   $OS = get_os($_SERVER['HTTP_USER_AGENT']); \/\/\u0443\u0437\u043d\u0430\u0451\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0443  $info = $_SERVER['HTTP_USER_AGENT']; \/\/\u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u044e \u0441\u0442\u0440\u043e\u043a\u0443 - \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442 <\/code><\/pre>\n<p>  \u0418 \u0442\u0430\u043a, \u0441\u0430\u043c\u043e\u0435 \u043f\u043e\u0441\u0442\u043e\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0443, \u0433\u043e\u0440\u043e\u0434 \u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u0427\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430, \u043d\u0443\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0441\u0442\u044c ip, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d \u00ab\u043a\u043e\u043c\u0430\u043d\u0434\u0443\u0435\u0442\u00bb. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 ip \u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 whois.<br \/>  \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c, \u043d\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439.  <\/p>\n<pre><code class=\"php\">   if( $curl = curl_init() ) {     $ip = $_SERVER[&quot;REMOTE_ADDR&quot;];     curl_setopt($curl, CURLOPT_URL, 'http:\/\/ip-whois.net\/ip_geo.php?ip='.$ip);     curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);     $out = curl_exec($curl);     $matches = array();     $country = preg_match_all(&quot;\/\u0421\u0442\u0440\u0430\u043d\u0430: (.*)\/i&quot;, $out, $matches);     $country = $matches[1][1];     curl_close($curl);   } <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0441 \u0433\u043e\u0440\u043e\u0434\u043e\u043c, \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u043c \u0438 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u043c. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043a\u043b\u0430\u0434\u0451\u043c \u0432 \u0431\u0430\u0437\u0443. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/211953\/\"> http:\/\/habrahabr.ru\/post\/211953\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0432\u0435\u0440\u044f\u0442 \u0432 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 (\u044f \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e \u043f\u0440\u043e \u0445\u0430\u0431\u0440\u0430\u0436\u0438\u0442\u0435\u043b\u0435\u0439:) ). \u041c\u043d\u043e\u0433\u0438\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e\u0442, \u0447\u0442\u043e <a href=\"http:\/\/img.2ip.ru\/ooops.jpg\">img.2ip.ru\/ooops.jpg<\/a> \u043f\u0440\u0430\u0432\u0434\u0430 \u0443\u0437\u043d\u0430\u0451\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442, \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043d \u0440\u0435\u0434\u0435\u0440\u0435\u043a\u0442\u0438\u0442 \u043d\u0430 \u00ab\u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e\u00bb \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u0418 \u0442\u0430\u043a, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0432\u0435\u0449\u0438: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c ip \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u0435\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043a\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-211953","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211953"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211953\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}