Jump to content

Archived

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

ben1989

Getting ip

Recommended Posts

sorry to post this but the search wont work with IP its under 3 caricters :(

what is the $_GET to get the ip?


thanks

ben :)

Share this post


Link to post
Share on other sites
[!--quoteo(post=386129:date=Jun 20 2006, 03:41 PM:name=ben_stringer)--][div class=\'quotetop\']QUOTE(ben_stringer @ Jun 20 2006, 03:41 PM) [snapback]386129[/snapback][/div][div class=\'quotemain\'][!--quotec--]
sorry to post this but the search wont work with IP its under 3 caricters :(

what is the $_GET to get the ip?
thanks

ben :)
[/quote]

there isn't a $_GET for it, but you can use $_SERVER:
[code]
echo $_SERVER['REMOTE_ADDR'];
[/code]

Share this post


Link to post
Share on other sites
Thanks

also what is it for to say mu hostname eg range23 @btibnbeg .con if u know what i mean :)

Share this post


Link to post
Share on other sites
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);

echo $hostname;
?>


done it :)

Share this post


Link to post
Share on other sites

×

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.