Unstoppable Domains — Get your daily AI drops report

IP Addresses

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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.
AfternicAfternic
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
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back