|
|
find out your IP address from whatismyip.com
There are a few web sites that can be used for finding out your (external) IP address. One of them is www.whatismyip.com
Of course it is better to obtain this info from your router if you can (as in the script used in the hint) but if you can't get such a script to work, here is a Perl script that gets the IP address from the HTML page that is returned by www.whatismyip.com
#!/usr/bin/perl
my $url = "http://www.whatismyip.com/";
my $html = `/usr/bin/curl -s -f $url`;
if ($html =~ /Your ip is (\d+\.\d+\.\d+\.\d+)/i)
{
my $ipaddr = $1;
print $ipaddr;
print "\n"; # remove this line if newline at end not wanted
exit;
}
print STDERR "Failed to get IP address from $url\n";
exit;
backslashes missing
It's really frustrating to enter code in these comments since the Preview lies through it's teeth about what will be shown.
Use the special tags...
Set the mode to html and then write your code like this:
[code] some <examples> of code \ and \ backslashes [/code]Then when you hit publish, everything will be retained. This will not work if you use "pre" or "tt" tags! And yes, they are SQUARE brackets around "code," not angle brackets. I need to add the instructions to the comment posting page; they are already on the story posting page... -rob. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|