All right, this is my last post on this issue. This will work:
$addr = '172.17.141.1';#Can be any IP address
$ip = inet_aton($addr);#Still the key to success
$client = gethostbyaddr($ip, AF_INET); # get client name
if ($client){print $addr, " : ", $client, "\n";}#For giggles...
ARRRGH, Scratch the last post. It doesn't work. Plust I had inet_ntoa written and gave a def for inet_aton. But, I do believe the problem lies in using one of those methods. I will work awhile longer and see what I find. Sorry for all the wasted space.
Well, after taking a minute after my first post I found the answer in this post:
thread219-533839 here is the way you need to do it:
$addr = '192.168.1.254';
$ip = inet_ntoa($addr);#<-- This is the key method
$hn = gethostbyaddr($ip, AF_INET);
From...
This will not work:
my $addr = "192.168.1.254";
my $name = gethostbyaddr($addr, AF_INET);
I have not quite figured out the problem yet, but it has to do with passing a scalar as a string to gethostbyaddr(). If you were to do the following it would work:
my $name =...
about the easiest way would be:
#!/usr/bin/perl -w
$userInput = "newname "; #added enough spaces @ end to make point
$userInput =~ s/\s+$//gi;
print "\"$userInput\"";
this will work for no space, a space, or many spaces @ the end of a string. I...
Not sure how the file your trying to read in is formatted. but hopefully this code may give your mind a spark to achieve your goal:
#!/usr/bin/perl -w
open (IN, "<tstfile.txt") or die "Cannot open file: $&";
@answers = <IN>;
foreach $ans (@answers){
chomp($ans);
if ($ans...
well, just to give an update: i created an mx record, but that did not cure the problem. i could still send mail but not recieve mail. i then created a new virtual server to test it with default settings, and i could send/recieve mail. it seems that on the default server i had set some...
Here is what is up i am using dynamic dns and here is the faq pertaining to there service:
http://support.dyndns.org/whitepapers/mail.php
i have helped many a people out on this site setting up sendmail and apache.
nope, port 25 is open, i can telnet to the port an recieve a reply from the smtp daemon. i have messed with the configuration of the server and now i can send e-mail to people on the internet, but cannot recieve mail from internet users. ah, how i miss linux and sendmail @ this point.
i can send and recieve local mail, but cannot recieve/send mail to/from internet users. basic installation, tried to figure out prob, but no go so far. also have dyndns setup, but no mx record <-- since it is not necessary. saw some stuff about the smtp connector, but since this is a soho setup...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.