I have written a bash script that writes my computer’s current dynamic ip address to a file which I have set to be synced to my Dropbox account using dropbox client on ubuntu.
The file which I’m syncing is an HTML file which on parsing shows some static text and a link to my computer’s ip-address.
Dropbox allows to create a static link to that file and distribute it to anyone. But problem is that when I open that link from anywhere, It first shows the link to download this file, on reloading the page it shows as it text of the file with all those html tags…
I want to parse that dropbox file as html, so that opening the file will show me a webpage consisting of a link to my current IP address.
Is it possible to do this with dropbox? then how ?
is there any other service which allows it? If yes then do they provide client for ubuntu or need to write some code for that..?
Inferring what the real problem is – you might look into a dynamic-dns service.
http://dnslookup.me/dynamic-dns/
If you have your own domain, you can then CNAME a host within your domain, say ‘home.example.com’ to the ddns service’s obscure hostname ‘yourusername.ddns.example.com’. Then set up your bash script to keep the ddns service up-to-date.
No need to futz with html files, just reference home.example.com in your links, and they will (almost) always point to the right IP.