RE: Any way to get WAN IP in VFP app?
This will work from within vfp as long as you can create an instance of IE and the website 'www.whatismyip.com' is up and running. This is quick and dirty - add your error checking: *create instance of IE If Type('OIE')='U' Public oie oie=Creat('internetexplorer.application') OIE.VISIBLE=.T. ENDIF lcurl=[http://www.whatismyip.com] oie.Navigate(lcurl) * I find you have to have three levels of checking on the web stuff * first check oie's readystate, then the documents, then the busy state of IE Do While oie.readystate<>4 Enddo Do While oie.Document.readystate<>'complete' Enddo Do while oie.busy Enddo * you might want to check on the existence of the next line (error trapping) lc=oie.Document.body.innertext * If it fails, return 'none' LCIP='NONE' FOR i = 1 TO MEMLINES(lc) lcline=UPPER(MLINE(lc,i)) IF OCCURS('YOUR IP IS',LCLINE)>0 lcip=STRTRAN(lcline,'YOUR IP IS','') ENDIF ENDFOR ?LCIP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: Monday, January 29, 2007 1:10 PM To: profox@leafe.com Subject: Re: Any way to get WAN IP in VFP app? Dave Crozier wrote: > Michael, > If you can shell out to a command line then run the command: > > ping -r 1 www.yahoo.com > > You will get back in the resulting message the WAN IP address. You can > obviously pipe the command out to a text file and examine this to extract > the WAN IP address > > Dave Crozier > Not reliable in my tests. I think the best thing to do is perhaps just do a NavigateTo with some tool of Rick Strahl's wwIPStuff.vcx and scrape the returned text for the value of "displaycopy" (between the parenthesis). -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
Re: Any way to get WAN IP in VFP app?
Dave Crozier wrote: > Michael, > If you can shell out to a command line then run the command: > > ping -r 1 www.yahoo.com > > You will get back in the resulting message the WAN IP address. You can > obviously pipe the command out to a text file and examine this to extract > the WAN IP address > > Dave Crozier > Not reliable in my tests. I think the best thing to do is perhaps just do a NavigateTo with some tool of Rick Strahl's wwIPStuff.vcx and scrape the returned text for the value of "displaycopy" (between the parenthesis). -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
Re: Any way to get WAN IP in VFP app?
Dave Crozier wrote: > Michael, > Also I've finished off the Google Earth demo and I'll (hopefully given time) > package it up for you this evening when I get home > > Dave Crozier > Wonderful! I look forward to seeing it! Thanks! -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
RE: Any way to get WAN IP in VFP app?
Michael, Also I've finished off the Google Earth demo and I'll (hopefully given time) package it up for you this evening when I get home Dave Crozier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Crozier Sent: 29 January 2007 17:00 To: 'ProFox Email List' Subject: RE: Any way to get WAN IP in VFP app? Michael, If you can shell out to a command line then run the command: ping -r 1 www.yahoo.com You will get back in the resulting message the WAN IP address. You can obviously pipe the command out to a text file and examine this to extract the WAN IP address Dave Crozier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: 26 January 2007 19:07 To: profox@leafe.com Subject: Re: Any way to get WAN IP in VFP app? Matthew Jarvis wrote: > MB Software Solutions wrote: > >> I've got code from here that gave the IP and MAC addresses of the >> computer running an app. Is there a way to get the WAN ip? >> >> > > Do you mean the public interface, as in the result of "whatismyip.com" > kinda thing? > > Yes! But note that I want this all to happen behind the scenes. -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
RE: Any way to get WAN IP in VFP app?
Michael, If you can shell out to a command line then run the command: ping -r 1 www.yahoo.com You will get back in the resulting message the WAN IP address. You can obviously pipe the command out to a text file and examine this to extract the WAN IP address Dave Crozier -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions Sent: 26 January 2007 19:07 To: profox@leafe.com Subject: Re: Any way to get WAN IP in VFP app? Matthew Jarvis wrote: > MB Software Solutions wrote: > >> I've got code from here that gave the IP and MAC addresses of the >> computer running an app. Is there a way to get the WAN ip? >> >> > > Do you mean the public interface, as in the result of "whatismyip.com" > kinda thing? > > Yes! But note that I want this all to happen behind the scenes. -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
Re: Any way to get WAN IP in VFP app?
Matthew Jarvis wrote: > MB Software Solutions wrote: > >> I've got code from here that gave the IP and MAC addresses of the >> computer running an app. Is there a way to get the WAN ip? >> >> > > Do you mean the public interface, as in the result of "whatismyip.com" > kinda thing? > > Yes! But note that I want this all to happen behind the scenes. -- Michael J. Babcock, MCP MB Software Solutions, LLC http://mbsoftwaresolutions.com http://fabmate.com "Work smarter, not harder, with MBSS custom software solutions!" ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.
Re: Any way to get WAN IP in VFP app?
MB Software Solutions wrote: > I've got code from here that gave the IP and MAC addresses of the > computer running an app. Is there a way to get the WAN ip? > Do you mean the public interface, as in the result of "whatismyip.com" kinda thing? Matthew S. Jarvis IT Manager Bike Friday - "Performance that Packs." www.bikefriday.com 541/687-0487 x140 [EMAIL PROTECTED] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** 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.