Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using script to save dynamic network ip address to file?

Is there a way I could use AppleScript to check for my network ip address? Or an alternative coding option? I need to save the ip address to a file if it has changed and then upload it to my ftp server with a date and time stamp. I have this part figured out its just checking for the address.

like image 627
Isaiah Turner Avatar asked Jan 28 '26 11:01

Isaiah Turner


1 Answers

ifconfig.me just returns a plain text public IP:

do shell script "curl ifconfig.me > ip.txt"
like image 184
Lri Avatar answered Jan 30 '26 07:01

Lri