Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 31, 2026.

IP Addresses

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Barrucadu

Established Member
Impact
64
Is it possible to get the IP of someone who clicks a submit button? Because ATM on my image hosting site I have no way of telling who uploaded what. If so whats the php?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
PHP:
function getip()
	{
		global $_SERVER;
		if ($_SERVER['HTTP_X_FORWARD_FOR']) //stupid proxies! :P
		{
			return $_SERVER['HTTP_X_FORWARD_FOR']; //get there real ip hehe
		} 
		else 
		{
			return $_SERVER['REMOTE_ADDR']; //they dont use a proxy :)
		}
	}

use that function...

and:
PHP:
$ip = getip();
 
0
•••
Well ,

I thing there is a way through javascript or when your validating the user's input

$User_IP = $_SERVER['REMOTE_ADDR'];

save the $User_IP in a database your ever you want and when you want to see
it you could make a script or edit personlally
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Watched threads: your alert now keeps up with new replies
When you watch a thread, each new reply now updates your alert. Before, you got one alert and then nothing until you read the thread...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back