Jump to content

Get a users IP address ( for banning).


Recommended Posts

$ipaddress = ss($_SERVER['REMOTE_ADDR']);

 

What's "SS" for?

 

The correct one is:

 

$ipaddress = ($_SERVER['REMOTE_ADDR']);

 

 

And I did this to see my own ip and checked it with ipchicken, worked great:

 

<?
$ipaddress = ($_SERVER['REMOTE_ADDR']);
echo "$ipaddress";
?>

It doesn't matter if its not the correct one, whatever IP they are using will be the same when they use your site. The ip ban will still work, unless they use a proxy. Thats when you use Geolocation http://www.maxmind.com/app/php

 

No, he posted the code wrong..

 

He put in a the letters "SS"

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.