cPanel, WHM, Fantastico - Reseller Hosting, Reseller Accounts, Domain Resellers - ADSL, Broadband, Dialup, FRAICO, Unmetered - Servers, Dedicated, Counter Strike, Game Servers
HostingResellersDomainsvpsDedicated ServersSupport
 
 
Register
 
Get New Posts
 
Search
 
User CP
xilo forum    
image image
Go Back   XILO Community Forum > Community > General Chat > Showing IP issue
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
travellinglad travellinglad is offline
Reseller
travellinglad is on a distinguished road
 
Posts: 81
Join Date: Dec 2005
Default Showing IP issue - 7/07/2007, 7:09 AM

Code:
 <?php echo $REMOTE_ADDR; ?>
I have this in a PHP file, but the IP address isn't showing.

It was until a few months back.

Anyone have any idea why?
Reply With Quote
  (#2 (permalink)) Old
solaris solaris is offline
User
solaris is on a distinguished road
 
Posts: 39
Join Date: Jul 2006
Default Re: Showing IP issue - 7/07/2007, 7:57 AM

Hi,

This will be because you have register_globals turned off (as it should be). You can access the same variable with:

PHP Code:
$_SERVER['REMOTE_ADDR'
I know that some time back the Xilo shared hosting default was for register_globals on - and I had raised the issue with Matt then. It could be that it has since been turned off, hence the change you noticed. You should update your code to reflect the change, as register_globals really should be off for security reasons.

Hope that helps

Last edited by solaris; 7/07/2007 at 8:01 AM.
Reply With Quote
  (#3 (permalink)) Old
travellinglad travellinglad is offline
Reseller
travellinglad is on a distinguished road
 
Posts: 81
Join Date: Dec 2005
Default Re: Showing IP issue - 7/07/2007, 8:02 AM

Ah that explains it Samir - thanks.

Do I just add that snippet of code as it is or do I need to include it into < ? php tag. Sorry, I'm not good on PHP, but learning.
Reply With Quote
  (#4 (permalink)) Old
Kieran Kieran is online now
Techie & Moderator
Kieran is on a distinguished road
 
Kieran's Avatar
 
Posts: 766
Join Date: Apr 2006
Location: Leeds, England
Default Re: Showing IP issue - 7/07/2007, 3:46 PM

Your code would need to be the following to echo the visitors IP address (remove space between the < and the ? )

Code:
< ?
echo $_SERVER['REMOTE_ADDR'];
?>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with Reseller Jessica Support Queries 0 28/09/2007 3:59 PM
E-mail Issue Simon Support Queries 6 6/09/2007 9:17 AM
DNS issue? WEBDosser Support Queries 3 22/05/2007 12:43 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin


split

XILO Communications Ltd.
Registered in England and Wales: 6451134
VAT Registered: GB 930 3394 39
Prices exclude VAT at 17.5%

We accept all major debit and credit cards via WorldPay and payments via PayPal
COPYRIGHT © 2002- XILO Communications Ltd.
ALL RIGHTS RESERVED