adsPlace_1

Войти или Зарегистрироваться

adsPlace_3

Получение IP пользователя на PHP

Иногда нужно определять IP-адрес пользователя.

Он может использоваться в системе защиты, идентификации и прочих. Но не всегда его можно определить  только при помощи $_SERVER[‘HTTP_CLIENT_IP’].

Ниже приведена функция для максимально точного определения IP-адреса пользователя.

Функция getIP():

function getIP(){
    if (!empty($_SERVER['HTTP_CLIENT_IP'])){
        //check ip from share internet
        $ip = $_SERVER['HTTP_CLIENT_IP'];
    }elseif(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
        //to check ip is pass from proxy
        $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
    } else {
        $ip = $_SERVER['REMOTE_ADDR'];
    }
return $ip;
}

А какие способы используете Вы?

Последние из рубрики

Комментарии(6)

    1. Аватар пользователя LatonyaShics

      LatonyaShics

      16:58 07.04.2018

      This message is posted here using XRumer + XEvil 4.0

      XEvil 4.0 is a revolutionary application that can bypass any antibot protection.
      Captcha Bypass Google (ReCaptcha-1, ReCaptcha-2), Facebook, BING, Hotmail, Yahoo,
      Yandex, VKontakte, Captcha Com — and over 8400 other types!

      You read this — it means it works! ;)
      Details on the official website of XEvil, there is a free demo version.

      Check YouTube video «XEvil ReCaptcha2»

      ответить
    2. Аватар пользователя wells fargo login

      wells fargo login

      14:34 17.04.2018

      The acquisition was disclosed in a legal filing with all the SEC, which is available
      through this hyperlink Also, Director Robert C. Wells fargo advantage
      funds login wells fargo login wells fargo 401k login We
      went, I checked on my banking account, along with the money was in there.
      The sale was disclosed in the legal filing while using SEC, that is
      available with the SEC website Company insiders own 0. Wells fargo student loan login [url=»https://loginto.us.com/»]wells fargo sign in[/url] wells fargo login The plaintiffs are searhing for an award of damages, including two times
      the level of back spend on alleged violations in the Dodd-Frank Act and treble damages as applicable beneath the Racketeer Influenced and Corrupt Organizations Act,
      or RICO.

      ответить
    3. Аватар пользователя 24 hour payday loan near me

      The idea is, instead of obtaining a payday loan, you literally do everything else.
      Critics see these chronic rollovers as proving the requirement
      for reform, and in the end it may. Seitz is surely an affable, very smart guy with a long reputation supporting the
      payday loan industry along with a fondness for that ultimate red herring about this issue — the notion which a little financial literacy will solve the situation. 24 hour payday loan near me And
      predictably, more than three quarters in the borrowers fail to pay
      back their payday loans after they’re due (usually within 30 days),
      leading to hefty penalties that force many borrowers to remove loan after
      loan his or her debt mounts. The controversial loans have drawn a great deal of scrutiny — and outright bans by
      Georgia along with a few other states — simply
      because they often feature high fees and interest rates that can add as much as more
      than 300 percent annually, so that it is hard for borrowers
      to pay for them off. The weakest folks society ought to be helped to guard themselves
      against usury.

      ответить
    4. Аватар пользователя craigslist search tool

      craigslist search tool

      15:56 13.05.2018

      Click the lamp beside the issue you need to report
      to Craigslist. The Academy of Country Music hosts a
      yearly award show honoring the most effective country singers, songwriters and notable contributors within the business.
      craigslist search tool Coin collecting is
      usually a fascinating hobby or maybe a profitable career.

      Posting ads in incorrect categories decreases the reality that anyone will click them and may even actually bring
      about users «flagging» your ads for incorrect placement.

      ответить
    5. Аватар пользователя Alba Settle

      Alba Settle

      02:48 17.05.2018

      If you’d probably like to gain the necessary education for being an Medical Assistant, why wait
      cna classes in michigan cna gna classes free cna classes in chicago
      candidates are chosen depending on their credentials, attitude, and interview and exam results.
      Some employers in Burbank will cover a percentage of one’s CNA tuition; others can pay
      tuition costs around a specific dollar amount cna classes wichita ks [url=»https://cnaclasses.us.com/»]cna classes[/url] cna classes
      in mn delaware hospice is actively seeking the full-time certified nursing assistant to are employed in kent county homecare.

      ответить
    6. Аватар пользователя Stephaine Marcello

      Stephaine Marcello

      03:36 17.05.2018

      If you have a very complaint about any content on Indeed, please contact Customer Support Indeed reserves the right
      to remove any posts which Indeed feels are not relevant to jobs and company search red cross cna classes
      cna classes cna classes in richmond va although this system
      is not provided by all times, they usually accept non-cna’s and cna’s to fill their employment needs.
      Upon successful completion, students can apply for that NC State Competency Medication Aide exam cna classes louisville
      ky [url=»https://cnaclasses.us.com/»]cna classes in michigan[/url] cna classes
      in richmond va a maximum of fifteen people will likely
      be selected per session.

      ответить

    Оставь свой отзыв

    Для вставки кода используйте кнопки php, html, javascript, css, sql

    * - поля обязательны к заполнению