Jump to content

Archived

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

.-INSANE-.

Is this right

Recommended Posts

[code]
<?php
$get = $REMOTE_ADDR
echo Your IP is "$REMOTE_ADDR" !!!
?>
[/code]

ok i was jus trying to see if i can sum of this stuff i kno its prolly wrong but what am i missing dont flame me im new to PHP

Share this post


Link to post
Share on other sites
No, REMOTE_ADDR is stored in the superglobal array $_SERVER and you don't have your quotes correct.

Try:
[code]<?php echo 'Your IP is ' . $_SERVER['REMOTE_ADDR'] .' !!!'; ?>[/code]

Ken

Share this post


Link to post
Share on other sites
ok so this is how its supposed to be now

[code]
<?php
$get = $REMOTE_ADDR
echo 'Your IP is ' . $_SERVER['REMOTE_ADDR'] .' !!!';
?>
[/code]

cuz for sum reason the $get = $remote-addr part doesnt seem right is 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.