On Tue, May 27, 2014 at 12:12 PM, < [email protected]> wrote:
> On 2014-05-27 12:40, [email protected] wrote: > >> On 2014-05-27 11:38, Stephen Russell wrote: >> >>> Read this as well: >>> >>> http://ipecho.net/developers.html >>> >>> Cache your return! You don't need to fire off for every user all the >>> time. >>> >> >> >> Eh, it's just on front-door access and shouldn't take long, right? >> Besides...isn't there a possibility the this person's IP address could >> change over time?? >> > > > > Aah, I see the light now after reading that page: > ------------------------ > PS: Please don't abuse the system, try to cache the IP for a reasonable > amount of time before doing another request. > > PS2: This limit shouldn't hinder development, but there's a limit in place > now, because the above suggestion appears to have been lost on some users: > Every IP that has a request rate of 10 calls / minute over a period of 30 > minutes. Will get blocked for 24 hours. > > Although the limit is clear, it would still be in everyone's interrest if > you could cache the IP for a longer period of time. > ------------------------ > > So I'll stuff the value in the registry along with a date/time stamp and > only seek out the site for a "check-in" if older than a period of 'x'. > > I'm taking that code Dave gave and incorporating this ipecho.net site as > a backup in case the first site fails to give a response too. > > --------- > You could have a webpage on your site that did the same thing. C# protected string GetIPAddress(){ System.Web.HttpContext context = System.Web.HttpContext.Current; string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (!string.IsNullOrEmpty(ipAddress)) { string[] addresses = ipAddress.Split(','); if (addresses.Length != 0) { return addresses[0]; } } return context.Request.ServerVariables["REMOTE_ADDR"];} Python os.environ["REMOTE_ADDR"] javascript <script>var uip='<%= Request.UserHostAddress %>';</script> Then you don't have to rely on a lot of other stuff being there. In the end you have to go outside the router to get this data. Make a page on your site to do this and then scrape the text as an easy to do in VFP. Make a web service on yo9ur end to do likewise and it returns the string in the function call you make in the WS. Now no scraping. Plenty of ways to have this. -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajidmy+_hao5rp6kah9j6a3aayhzqekyaynn4n86wgznk6t...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

