Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
Goldberg
New Member
New Member



Joined: Feb 09, 2004
Posts: 18

PostPosted: Sun Feb 29, 2004 3:56 am Reply with quote

I've got phpnuke 7.1.1NSN installed and I'm trying to get a modified userinfo block (original by http://www.rvhresources.com) working.

If you go to http://www.europaischcorp.nl/php/ you can see the block on the right site.

Ive got:
- user avartar
- welcome ....

- Your IP: (working)
- Your host: (not working)

Right now it's giving the IP, just to show you where my problem is. When I change the code from:
Code:
$content .= "<tr><td width=\"100%\"><left>Your IP: $ip</left></td></tr>\n";

$content .= "<tr><td width=\"100%\"><left>Your Host: $ip</left></td></tr></table></div><hr noshade size=1>\n";

to
Code:
$content .= "<tr><td width=\"100%\"><left>Your IP: $ip</left></td></tr>\n";

$content .= "<tr><td width=\"100%\"><left>Your Host: $hostnm</left></td></tr></table></div><hr noshade size=1>\n";

Changing the second $ip to $hostnm I get an empty line instead of this
example:
Your Host: ip***d***a.speed.planet.nl (the *** are numbers). When I look at the IP_tracking module it's working just fine. What am I missing??
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Feb 29, 2004 6:21 pm Reply with quote

I know nothing of this mod, so I don't know where the variables/values come from. I could only suggest that it may be a global declaration or an sql call. In other words, where ever the $ip variable comes from, is $hostnm originated there too? If so, look at all the places that $ip is used. Make sure that if $ip is being selected in an sql select statement, that $hostnm is too. If $ip is being declared in a global statement, make sure that $hostnm is too.
 
View user's profile Send private message
Goldberg







PostPosted: Mon Mar 01, 2004 12:41 am Reply with quote

Code:
$content .= "<tr><td width=\"100%\"><left>Your IP: ".$_SERVER['REMOTE_ADDR']."</left></td></tr>\n";

$content .= "<tr><td width=\"100%\"><left>Your Host: ".gethostbyaddr($_SERVER['REMOTE_ADDR'])."</left></td></tr></table></div><hr noshade size=1>\n";
This works.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©