AIDA wrote:AIDA wrote:Ya encontré lo que atora al programa es esto que uso para sacar la IP
ippub:= PublicIP()![]()
si quito el PublicIP() ya no se atora
por que pasara esto y como remediarlo?
sera culpa del windos 11![]()
Code: Select all | Expand
//**************************************************************
Function PublicIP()
Local cBuffer, cRequest, cResponse, nBytes, pSocket
INetInit()
pSocket := INetConnect( "checkip.dyndns.org", 80 )
IF INetErrorCode( pSocket ) <> 0
? "Socket error:", INetErrorDesc( pSocket )
INetCleanUp()
QUIT
ENDIF
nBytes := INetSend( pSocket, "GET / HTTP/1.1" + CRLF + "Host: checkip.dyndns.org" + CRLF + "User-Agent: HTTP-Test-Program" + CRLF + CRLF )
cBuffer := Space(512)
cResponse:= ""
WHILE ( nBytes > 0 )
nBytes := INetRecv( pSocket, @cBuffer )
cResponse += Left( cBuffer, nBytes )
cBuffer := Space(512)
ENDDO
INetClose( pSocket )
INetCleanUp()
Return( allTrim( substr( substr( cResponse, rat( "<body>", cResponse ) + 26 ), 1, At( "<", substr( cResponse, rat( "<body>", cResponse ) + 26 ) ) - 1 ) ) )
Aviso que el servidor de SQL esta caído
Re: Aviso que el servidor de SQL esta caído
Que es mejor que programar? creo que nada 
Atropellada pero aqui ando
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Atropellada pero aqui ando

I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
Re: Aviso que el servidor de SQL esta caído
el problema sera lo que comenta Rick Lipkin 
Una respuesta un poco remota... muchas aplicaciones en la nube, Att.net, Google.cm... consideran ciertas aplicaciones como "menos seguras" y tienes que generar una contraseña segura especial antes de que tu aplicación se conecte...
https://support.google.com/accounts/ans ... 0255?hl=es

Una respuesta un poco remota... muchas aplicaciones en la nube, Att.net, Google.cm... consideran ciertas aplicaciones como "menos seguras" y tienes que generar una contraseña segura especial antes de que tu aplicación se conecte...
https://support.google.com/accounts/ans ... 0255?hl=es
Que es mejor que programar? creo que nada 
Atropellada pero aqui ando
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Atropellada pero aqui ando

I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
Re: Aviso que el servidor de SQL esta caído
Hello Rick Lipkin
I did what you recommended and if you were right I generated a key with the name of my application and it finally works correctly
but this will have to be done by each user who acquires my program
https://support.google.com/accounts/answer/185833?hl=es-419
I did what you recommended and if you were right I generated a key with the name of my application and it finally works correctly
but this will have to be done by each user who acquires my program


https://support.google.com/accounts/answer/185833?hl=es-419
Rick Lipkin wrote:Aida
Kinda a long shot answer ... many cloud applications, Att.net, Google.cm .. consider certain apps as "less secure" and you have to generate a special secure password before your application will connect ..
https://support.google.com/accounts/ans ... 0255?hl=en
Just my 2 cents worth ..
Rick Lipkin
Que es mejor que programar? creo que nada 
Atropellada pero aqui ando
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Atropellada pero aqui ando

I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
- Antonio Linares
- Site Admin
- Posts: 42602
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 43 times
- Been thanked: 88 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42602
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 43 times
- Been thanked: 88 times
- Contact:
Re: Aviso que el servidor de SQL esta caído
En este ejemplo de mod_harbour tienes el código que necesitas. Posiblemente hay formas aún más sencillas de hacerlo 
callphp.prg

callphp.prg
Code: Select all | Expand
#ifdef __PLATFORM__WINDOWS
#include "c:\harbour\contrib\hbcurl\hbcurl.ch"
#else
#include "/usr/include/harbour/hbcurl.ch"
#endif
function Main()
curl_global_init()
? "Hello world"
? callPHP( "www.fivetechsoft.com/getip.php" )
curl_global_cleanup()
return nil
function callPHP( cUrl )
local hCurl, uValue
if ! empty( hCurl := curl_easy_init() )
curl_easy_setopt( hCurl, HB_CURLOPT_URL, cUrl )
curl_easy_setopt( hCurl, HB_CURLOPT_DL_BUFF_SETUP )
if curl_easy_perform( hCurl ) == 0
uValue = curl_easy_dl_buff_get( hCurl )
endif
endif
return uValue
- Antonio Linares
- Site Admin
- Posts: 42602
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 43 times
- Been thanked: 88 times
- Contact:
Re: Aviso que el servidor de SQL esta caído
Aida,
Más simple:
Más simple:
Code: Select all | Expand
function Main()
MsgInfo( WebPageContents( "http://www.fivetechsoft.com/getip.php" ) )
return nil
Re: Aviso que el servidor de SQL esta caído
Super
si funciona y el malvado
google ya no bloquea la aplicación
Muchas gracias
seguimos en contacto y dando lata
Saluditos



Code: Select all | Expand
ippub:= WebPageContents( "http://www.fivetechsoft.com/getip.php" )
Muchas gracias

seguimos en contacto y dando lata

Saluditos

Antonio Linares wrote:Aida,
Más simple:Code: Select all | Expand
function Main()
MsgInfo( WebPageContents( "http://www.fivetechsoft.com/getip.php" ) )
return nil
Que es mejor que programar? creo que nada 
Atropellada pero aqui ando
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Atropellada pero aqui ando

I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
- Antonio Linares
- Site Admin
- Posts: 42602
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 43 times
- Been thanked: 88 times
- Contact:
Re: Aviso que el servidor de SQL esta caído
Code: Select all | Expand
function FW_PublicIP()
return WebPageContents( "http://www.fivetechsoft.com/getip.php" )
Re: Aviso que el servidor de SQL esta caído
Code: Select all | Expand
function GetWebIp
local cReturn
local xmlhttp
xmlhttp := win_oleCreateObject( "MSXML2.ServerXMLHTTP" )
xmlhttp:Open( "GET", "http://dynupdate.no-ip.com/ip.php", .F. )
Try
xmlhttp:Send()
cReturn := xmlhttp:responseBody
Catch
cReturn := "0.0.0.0"
End
xmlhttp := nil
return cReturn
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces