is this a problem with my site or the host?
every user has the same ip, and i dont know who is who
can it be changed on the host?
or can i do something with my site,
is this a problem with my site or the host?
every user has the same ip, and i dont know who is who
can it be changed on the host?
or can i do something with my site,
No, IP cannot be changed.
Regards ~ Vishal
Giving Reputation(at bottom of my post ) is the best way to encourage the person who helped you on forums.
If you are saying that one of your scripts checks the IP of your users, and that the script shows all the same IPs, then that is a result of the load distributing setup that x10hosting uses for their servers.
PHP, try using:
HTTP_X_FORWARDED_FOR
HTTP_X_REAL_IP
Last edited by descalzo; 01-19-2011 at 08:59 AM.
Nothing is always absolutely so.
Note that both come from the X-Forwarded-For and X-Real-IP HTTP headers, respectively, and can thus be spoofed. It shouldn't matter when using the load balancing server (since they'll add the clients real IP to the headers), but if you ever migrate your code to another server that doesn't use proxied load balancing, you could be opening a hole in your security. Just to be safe, you might want to combine both the real and forwarded remote addresses.
This won't help you with load-balanced proxies that the client might use, as the remote address might vary with each request, which will appear to be a hijack attempt.PHP Code:function remoteAddr() {
static $remote_addr = null;
if (is_null($remote_addr)) {
$remote_addr = $_SERVER['REMOTE_ADDR'];
foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_REAL_IP') as $hdr) {
if (isset($_SERVER[$hdr])) {
$remote_addr .= '/' . $_SERVER[$hdr];
break;
}
}
}
return $remote_addr;
}
Last edited by misson; 01-20-2011 at 04:29 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.