get public IP address

Does anyone know to use “URL Access Scripting” to extract a wireless Public IP address from the browser page using http://whatsmyip.islayer.com

Another simpler way is to use CURL command which I know how to do.

Thanks,
Tommy

this is from Mac OS X Hints
http://www.macosxhints.com/article.php?story=20041027004039912


WanIP()

display dialog "Your IP Address is " & result
on WanIP()
	set WIP to missing value
	set siteList to {"http://checkip.dyndns.org/", "http://whatismyip.com", "http://www.whatismyipaddress.com", "http://ipid.shat.net/", "http://www.edpsciences.comhtbin/ipaddress", "http://www.showmyip.com/"}
	repeat with thissite in siteList
		try
			set WIP to item 1 of paragraphs of (do shell script "curl " & thissite & " | tr -cs '[0-9\\.]' '\\012' | awk -F'.' 'NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && $4<256 && !/\\.\\./'")
			if WIP is not missing value then exit repeat
		end try
	end repeat
	return WIP
end WanIP

Tom

Browser: Firefox 3.6.3
Operating System: Mac OS X (10.6)