Page 1 of 1

Parsing html / server

Posted: Sun Nov 25, 2012 3:48 am
by kbirand
I have been parsing whatismyipaddress.com with

put url("http://whatismyipaddress.com/ip/8.8.8.8") into aaa

and some lines of code which parse the result
successfully but after a while I started to get:
Too many queries<BR> You appear to be an automated script. Site terms and conditions do not allow for automated/script access.
Please wait one hour before coming back to the site.
For API details see http://whatismyipaddress.com/api
But when I open the link with my safari everything seems to work
But with livecode I keep getting the same response.

So i assume the page that i am accessing is doing some kind of header check.

Is there a way to send data as SAFARI or some other browser.

Thanks,
Koray Birand

Re: Parsing html / server

Posted: Sun Nov 25, 2012 6:27 am
by shaosean
Please do not attempt to obtain the IP address by querying the homepage of our website.
We provide a specific page that returns just the IP address of the device making the request on http://bot.whatismyipaddress.com. You are free to query that server but please limit queries to no more than once per five minutes. While rate limiting is currently not in place if the service is abused it will be.
Plus the data returned on the http://bot.whatismyipaddress.com address is simply plain text with the IP address and no need to parse out the HTML..

Re: Parsing html / server

Posted: Sun Nov 25, 2012 12:33 pm
by kbirand
shaosean wrote:
Please do not attempt to obtain the IP address by querying the homepage of our website.
We provide a specific page that returns just the IP address of the device making the request on http://bot.whatismyipaddress.com. You are free to query that server but please limit queries to no more than once per five minutes. While rate limiting is currently not in place if the service is abused it will be.
Plus the data returned on the http://bot.whatismyipaddress.com address is simply plain text with the IP address and no need to parse out the HTML..
Shaosean,

Thank you for your suggestion, but that was not my question, I already know that.
I am not querying my own ip, Instead I want to query different ip's to get their location data.

Thanks,
Koray Birand

Re: Parsing html / server

Posted: Sun Nov 25, 2012 2:59 pm
by shaosean
Sorry, I thought you were writing software to get the IP address when the software was running on a client machine.. But the first part of message still holds true, they do not want you to hammer their website with queries.. In regards to the question you asked, you can set the headers used by libURL and pass along whatever data you would like (so you can even make your software claim to be Safari)

http://docs.runrev.com/Command/libURLSe ... TTPHeaders

Re: Parsing html / server

Posted: Sun Nov 25, 2012 6:53 pm
by jacque
IP to Country conversions at the late Mark Smith's web archive: http://marksmith.on-rev.com/revstuff/

He left us a rich legacy before he passed away.