login script with ip
Posted: Sat Dec 23, 2006 6:29 am
Everah | Please use
thanks for the help
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
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.
Code:Code: Select all
<?php
// ip_grab.php
/* Note: You can also check against $_SERVER variables
not included in this script */
function ipGrabber() {
if(getenv('HTTP_CLIENT_IP')):
$ip = getenv('HTTP_CLIENT_IP');
elseif(getenv('HTTP_X_FORWARDED_FOR')):
$ip = getenv('HTTP_X_FORWARDED_FOR');
else:
$ip = getenv('REMOTE_ADDR');
endif;
return $ip;
}
echo '<p>Your IP is: <b>'. ipGrabber() .'</b>.</p>';
?>thanks for the help
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]