CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Sockets again - gathering connected host IP


New User

Apr 22, 2008, 9:57 AM

Post #1 of 2 (307 views)
Sockets again - gathering connected host IP Can't Post

Hi everyone. I've got a question. I'm rather perl beginner (intermediate is maximum), working on simple server-client PERL application, and I am testing it on the same machine. Let's say there is a server listening for connection.Now: client is connecting. How can I check what's client's IP ? I know I could use socket->peerhost, but the value is and I want "real" IP, such as when I'm running ifconfig ( for example ). Anyone could help me ? Thanks in advance.


Apr 23, 2008, 4:26 PM

Post #2 of 2 (300 views)
Re: [putrycydes] Sockets again - gathering connected host IP [In reply to] Can't Post

 my $host = gethostbyaddr($socket->peeraddr, AF_INET);

wouldn't work, right?


You may also find Perl information on my blog:


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives