[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] gethostbyaddr in ic pages, how ?


Quoting Niels Svennekj?r (suppressed):
> Hi
> 
> For debugging purposes I would like to get a hostname (from an ip) on a 
> ic page
> 
> I have tryed following (with an lot of variations over "use Socket", 
> Socket:.....)
> 
> [perl]
> $hostip="1.2.3.4";
> return(gethostbyaddr(Socket::inet_aton($hostip),Socket::AF_INET) );
> [/perl]
> 
> But it alvays gives an error, like
> - Safe: 'gethostbyaddr' trapped by operation
> - Undefined subroutine &Socket::inet_aton
> - "use" not allowed in expression
> 
> If I want to make an 'lookup' of the hostname. Do I have to make an 
> usertag to do it ?

you can do with global usertag, of course, but you can also set

  hostnamelookups  yes

in interchange.cfg, and then it is available in 

	$Session->{host} or [data session host]

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <suppressed>

p.s. sorry for lower case, injured hand

If you think nobody cares if you're alive, try missing a couple of
car payments.  -- Earl Wilson
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.