Maybe test with this code:
CLEAR ? GetHTTPContent("http://www.atoutfox.org/ip.asp", .T.) ? GetHTTPContent("http://ipecho.net/plain")
******************************************* FUNCTION GetHTTPContent ******************************************* LPARAMETERS cURL, lBodyOnly
LOCAL oHTTP as Msxml2.ServerXMLHTTP, cErrorText, cHTML, lErrorState STORE "" TO cErrorText, cHTML
TRY ohttp = CREATEOBJECT("Msxml2.ServerXMLHTTP") CATCH cErrortext = "Cannot instanciate MSXML2" lErrorstate = .t. ohhtp = .NULL. ENDTRY
IF VARTYPE(oHTTP) = "O" TRY oHTTP.OPEN("GET",cUrl,.F.) oHTTP.SEND() CATCH lErrorState = .T. cErrortext = "Open/Send failed" ENDTRY ENDIF
IF NOT lErrorState cHtml = oHTTP.responseBody
IF NOT INLIST(VARTYPE(cHTML),"Q","C") OR EMPTY(cHTML) lErrorState = .T. cErrortext = "error on response" ELSE * convert unicode to utf cHtml = STRCONV(cHTML,9) ENDIF ENDIF
IF lErrorState cHTML = "Error: " + cErrorText ELSE IF lBodyOnly cHTML = STREXTRACT(cHTML, "<body>", "</body>",1,1) ENDIF ENDIF RETURN cHTML
... or (Win10) just try: !curl -s ipecho.net/plain |clip * ?_cliptext
* cURL is on latest Win10 - I didn't know clip/clip.exe was but it works for me!
wOODy's worked for me...this did not.
On 6/17/2020 12:18 PM, AndyHC wrote:
!curl -s ipecho.net/plain |clip
wait...sorry...invalid test as I tried this in Win7.
On 6/17/2020 1:13 PM, MB Software Solutions, LLC wrote:
wOODy's worked for me...this did not.
On 6/17/2020 12:18 PM, AndyHC wrote:
!curl -s ipecho.net/plain |clip