On Tuesday, January 6, 2004, at 09:57 PM, Stephan Hochhaus
[EMAIL PROTECTED] wrote:
Is there a way to read out my WAN IP address in Mac OS X (maybe
extract it from
a logfile) and write it to a file?
FWIW, I use http://checkip.dyndns.org/ for this purpose; its output is
easy to parse. I do it
Hi Zach,
Well, this almost works for me.
#!perl
my $ifconfig = `ifconfig`; # the ifconfig command gives the current
network information
$ifconfig =~ /inet (\d+\.\d+\.\d+\.\d+)/; # extract the ip address
with a regular expression
This does extract my IP address, but the one for the loopback
Hi Zach,
Well, this almost works for me.
#!perl
my $ifconfig = `ifconfig`; # the ifconfig command gives the current
network information
$ifconfig =~ /inet (\d+\.\d+\.\d+\.\d+)/; # extract the ip address
with a regular expression
This does extract my IP address, but the one for the
Hey Zach, Rick and everyone who helped me on this:
I just finished a very simple script that reads out my IP-address from
the ppp0 device, creates a small HTML file and uploads it to my
webhoster so i can access my g4 from anywhere in the world. The script
is the patchwork of a beginner, so
* Stephan Hochhaus [EMAIL PROTECTED]
I just finished a very simple script that reads out my IP-address from
the ppp0 device, creates a small HTML file and uploads it to my
webhoster so i can access my g4 from anywhere in the world. The script
is the patchwork of a beginner, so any advice on
Hello out there,
I know this has been asked before, and I have taken a look at at least
one thousand websites, but I couldn't come up with a working solution
as of yet.
I want to upload a textfile to my website, that contains the IP of my
Mac at home (which is assigned dynamically since it
There are a couple of quick and dirty ways to do this. Here's one
solution:
#!perl
my $ifconfig = `ifconfig`; # the ifconfig command gives the current
network information
$ifconfig =~ /inet (\d+\.\d+\.\d+\.\d+)/; # extract the ip address with
a regular expression
my $ip = $1;
# write it to a