[ic] gethostbyaddr in ic pages, how ?
Ed LaFrance (New Media E.M.S.)
ic_users at newmediaems.com
Fri Sep 24 10:11:33 EDT 2004
At 02:38 AM 9/24/2004, you wrote:
>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 ?
>
>- Niels
You could make a global UserTag to do this, which is probably the most
correct way once you have working code. In the meatime you can do this in
interchange.cfg:
AllowGlobal yourcat
(restart Interchange) ...and then add global=1 to the opening [perl] tag,
and you should be able to develop and test your code with in-page perl like
you were trying to.
- Ed
===============================================================
New Media E.M.S. Technology Solutions for Business
11630 Fair Oaks Blvd., #250 eCommerce | Consulting | Hosting
Fair Oaks, CA 95628 Ed.LaFrance at newmediaems.com
(916) 961-0446 http://www.newmediaems.com
(866) 519-4680 Toll-Free (916) 961-0447 Fax
===============================================================
More information about the interchange-users
mailing list