Jump to content

ip login script


Recommended Posts

hey guys i got this code but i need to add a code that you can't signup with the same ip?
in my signup form.

// ip_grab.php
/* Note: You can also check against $_SERVER variables
  not included in this script */
function ipGrabber() {
        $ip = getenv('HTTP_CLIENT_IP');
        $ip = getenv('HTTP_X_FORWARDED_FOR');
        $ip = getenv('REMOTE_ADDR');
    return $ip;

echo '<p>Your IP is: <b>'. ipGrabber() .'</b>.</p>';

thx for the help
Link to comment
Share on other sites

There are dynamic IPs, and you can also just request your IP to be changed.
You can also use masking services and proxies.

It can help when trying to detect multiple users, but it's not very accurate. My husband and I are both on several sites, and we use the same IP. We use different emails and names, so we are not the same person. Allow people to use the same IP, and simply record it to help determine if it might be the same person.

For example - someone registered on my site once with two different emails, which were similar, and the same IP. Now, it could have been two different people - but they used the same birthdate and password - that was why I figured it was the same person.
Link to comment
Share on other sites


An IP address (Internet Protocol address) is a unique address that devices use in order to identify and communicate with each other on a computer network utilizing the Internet Protocol standard (IP)—in simpler terms, a computer address. Any participating network device—including routers, computers, time-servers, printers, Internet fax machines, and some telephones—can have their own unique address. Also, many people can find personal information through IP addresses.

An IP address can also be thought of as the equivalent of a street address or a phone number (compare: VoIP(voice over (the) internet protocol)) for a computer or other network device on the Internet. Just as each street address and phone number uniquely identifies a building or telephone, an IP address can uniquely identify a specific computer or other network device on a network.

An IP address can appear to be shared by multiple client devices either because they are part of a shared hosting web server environment or because a proxy server (e.g., an ISP or anonymizer service) acts as an intermediary agent on behalf of its customers, in which case the real originating IP addresses might be hidden from the server receiving a request. The analogy to telephone systems would be the use of predial numbers (proxy) and extensions (shared).
Link to comment
Share on other sites

To put it another way. At the place where I work we have around 700 pcs all connected to the internet. To your website, anyone logging in from any of these pcs would like like the same person. Each pc has its own internal ip address used on our LAN, but we all share 1 ip address for the internet WAN.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.