Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Networking

Journal jawtheshark's Journal: Interesting: IP Address webservice 10

I needed my IP Address for a script and wanted to be router independent. I thought by myself: a little web service that just returns your IP address as text should exist. Scraping web pages didn't seem like an intelligent option, as layouts change. I didn't find anything, so I decided to go scraping anyway. Then I found this commend in the code of whatismyip.com:

<!--Please set your code to scrape your IP from www.whatismyip.com/automation/n09230945.asp For more info, please see our "Recommended Automation Practices" thread in the Forum.-->

Thank you Internet... Exactly what I needed!

This discussion has been archived. No new comments can be posted.

Interesting: IP Address webservice

Comments Filter:
  • I found http://www.whatismyip.org/ [whatismyip.org] to be easier to scrape ;)

    • <?php echo $_SERVER['REMOTE_ADDR'];

      Stick it on the server of your choice, and you're all set. No, you don't need the closing tag.

      remote_addr [slushdot.com]

      I usually have a script to give me the output of phpinfo on a few domains so that I can test the cookies I'm setting/getting, etc. Always handy :-)

      • Of course I know that's a possibility. However, that assumes that I have a "real" server. All my (non-work) servers are on ADSL lines with dynamic IPs. It adds in another level of failure. Also, my servers both run OpenBSD and I don't have PHP installed on them, as I don't need it and it opens another level op security problems.

        Basically, the dynamic IP part is what I'm trying to solve. I have an account at dyndns.org from before it became paying. This means I have 1 account that doesn't expire for my

        • Fair enough, but when you can get a real hosting account with 600 gigs of disk space and unlimited domains for $1.67 a month [iweb.com], and registering a domain is $8 a year (which you're paying anyway - and it's a buck for the first year for one domain as a sign-up bonus), why not get everyone you're supporting to chip in a few bucks for a real hosting account, and dole out subdomains from that?

          A simple script on the client machine would then hit http://theirsubdomain.yourdomain.com?update.php?soopersekretkey=349b [yourdomain.com]

          • Nice... Didn't know that hosting was so cheap these days. Last time I checked it was 6€/month. I can't expect people to pay for this. Family 'n friends, ya know.

            Besides, I always wanted a .lu domain. I was surprised that one was still free. (Bought it Thursday, it's still not activated... *sigh*)

            • It's $200 for 10 years, so a couple of years ago, I moved everything there. So at the end of last year (December 31st) when we needed our own server, that's where we went. About $150 a month for a 100mbps connection, 10Tb/month of bandwidth, twin 1TB drives, 5 dedicated IPs, what's not to like?

              But back to the $200 for 10 years bit - it's paid up for almost the next decade, so there's no big deal if anyone in my family wants some space to play around with, and it beats having to leave a machine on at hom

              • I know what you mean about family and friends - they don't understand that your free time isn't free. There *is* a cure for that - let them run Windows. At that point, it's their problem. "Do I look like a maid? I don't do Windows!" works every time.

                Just for the record. Those that need Windows, will have to run under my rules. My rules are: it's my installation, I'm admin, you get Limited User. Don't like that? Get another nerd.

                That system works flawlessly. :-) Windows 7 is a bit more a bitch to run a

                • Having seen Windows 7 on a neighbor's laptop, I've got to wonder - we had the same transparent windows/taskbar under linux years ago - the first thing I did was turn it off because it made it harder to use the computer.

                  Why does Microsoft continue to rip off KDE? They're getting worse than Ubuntu ripping off Apple.

                  • I still have to write a Journal entry on my fight with Windows 7 Professional on my brothers desktop computer. Technologically it may be a step in the "future" because of the good 64-bit support. For the rest... ehm, from an Administrator point of view (for small networks, big networks get other tools) it is not a good system at all.

                    Well, it smells like a Vista, walks like a Vista, quacks like a Vista...

                    Microsoft needs to stop pandering the home user and take us IT people back in control.

    • Yes, well... In their FAQ/Forums they make it clear that you can get banned if you do that. I prefer not to get banned. Especially if the script is run every 15 minutes.

The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group.

Working...