Search found 86 matches: gethostbyname

Return to advanced search

Re: get your external IP

I allready Used

Function GetIP()
Local cVar1
WsaStartUp()
cVar1 := GetHostByName( GetHostName() )
WsaCleanUp()
return cVar1
by Silvio.Falconi
Mon Jun 03, 2024 8:39 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: get your external IP
Replies: 11
Views: 1099

Re: get your external IP

I am using Windows 11 Pro, Version 23H2

I am getting the local IP via GetHostByName( GetHostName() )
by anserkk
Mon May 06, 2024 4:43 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: get your external IP
Replies: 11
Views: 1099

Re: get your external IP

Saludos Antonio

Para obtener la direccion IP local utilizo: GetHostByName( GetHostName() ) y en Win10 funcion Ok, el resultado lo comprado con IpConfig y me da lo mismo.
Pero con Win11, me da un valor distinto al que me retorna IpConfig ... creo que algo ahi no esta Ok ...
Gracias
by Enrrique Vertiz
Mon May 06, 2024 3:51 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: get your external IP
Replies: 11
Views: 1099

Re: GetHostByName( GetHostName() )

...   // Clean up    free(pAddresses);    WSACleanup();    return 0;}  Google Gemini: The behavior you're experiencing with GetHostByName returning an IP address different from the one on your desired subnet is not necessarily a bad configuration. Here's why: Function Behavior: ...
by Antonio Linares
Wed Mar 06, 2024 9:44 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: GetHostByName( GetHostName() )
Replies: 1
Views: 356

GetHostByName( GetHostName() )

I use WSAStartup() ; cIp := GetHostByName( GetHostName() ) ; WSACleanup(), to get the local IP address. However my system has an EtherNet, Hamachi, and 2 VMware showing as adapters. The address returned by the function GetHostByName returns ...
by byron.hopp
Wed Mar 06, 2024 7:35 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: GetHostByName( GetHostName() )
Replies: 1
Views: 356

Re: Condition of the site

Thank you, Karinha, it works! What are the WSAStartup/Wsacleanup functions for in this case? Why prescribe 2 times: cIp := GETHOSTBYNAME( "yoursite.com" ) cIp := GETHOSTBYNAME( "yoursite.com" ) Good Morning. This was a tip on the FiveWin Brasil forum. Just to be ...
by karinha
Thu Dec 08, 2022 12:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Condition of the site
Replies: 3
Views: 522

Re: Condition of the site

Thank you, Karinha, it works!
What are the WSAStartup/Wsacleanup functions for in this case?
Why prescribe 2 times:
cIp := GETHOSTBYNAME( "yoursite.com" )
cIp := GETHOSTBYNAME( "yoursite.com" )
by Natter
Thu Dec 08, 2022 6:47 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Condition of the site
Replies: 3
Views: 522

Re: Página Caída

veja se isto resolve?

If GetHostByName( "bazevani.com.br" ) = "0.0.0.0"
by ronaldo
Fri Mar 27, 2020 10:15 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Página Caída
Replies: 1
Views: 395

Tambien Saber Ip LOCAL

... WSADATA wsa_Data; WSAStartup( 0x101, &wsa_Data ); char szHostName[255]; gethostname(szHostName, 255); struct hostent *host_entry; host_entry = gethostbyname(szHostName); char * szLocalIP; szLocalIP = inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list); WSACleanup(); hb_retc( szLocalIP ...
by Busmatic_wpb
Fri Dec 07, 2018 2:15 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Saber Ip Publico
Replies: 1
Views: 636

Re: IsInternet() Lento

Gracias Karinha por responder, lo voy a probar como me indicas y te comento como me fue, sólo una pregunta, por que haces una doble llamada a la función GetHostByName() ?

Saludos!!

Eduardo Borondón Muñiz
by EBM
Thu Feb 01, 2018 11:05 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: IsInternet() Lento
Replies: 4
Views: 1232

IsInternet() Lento

... al ejecutar la función IsInternet() sobre todo cuando el internet se cae, tarda hasta 30 segundos en regresar el control al equipo, ya intente con GetHostByName y me sucede lo mismo en varios equipos. Habrá alguna solución mas rápida para poder detectar si se tiene conexión a internet?? Alguna ...
by EBM
Thu Feb 01, 2018 12:27 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: IsInternet() Lento
Replies: 4
Views: 1232

Problemas al enviar a @hotmail.com

... (si no equivoco). ********************************* EDITO, amplío información: Resulta que el servidor de mi mail es: smtp.rebuts.cat Si realizo GetHostByName(smtp.rebuts.cat), me devuelve la IP 46.16.61.50 Ahora bien, si realizo GetHostByAddress(46.16.61.50), me devuelve una cadena vacía. Entonces, ...
by FiveWiDi
Sun Dec 03, 2017 10:27 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Problemas al enviar a @hotmail.com
Replies: 3
Views: 985

Re: SockCli and SockServer sample using is not clear for me

I changed the IP (default seems to be (Gethostbyname) function Server()   oSocket = TSocket():New( 33334 )   oSocket:cIPAddr  = "192.168.1.101"   oSocket:bAccept = { | oSocket | oClient := TSocket():Accept( ...
by Marc Venken
Fri Sep 22, 2017 10:23 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: SockCli and SockServer sample using is not clear for me
Replies: 10
Views: 2161

Re: smtpserver

... SendMail() local oOutMail, cIP, oOutMail1 oDlg:SetMsg( "Sending Internet email..." ) WSAStartup() * oOutMail1 := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) ) oOutMail := TSmtp():New( cIP := GetHostByName( "smtphm.sympatico.ca",25,.t.,"wilsonrw@sympatico.ca", ...
by richard wilson
Wed Oct 05, 2016 6:10 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: smtpserver
Replies: 5
Views: 1473

Re: smtpserver

... after a period of time, or the established connection failed because the connected host has failed to respond. oOutMail := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) ) Have you provided the Port number, username password required to connect to your email server For eg ...
by anserkk
Thu Sep 29, 2016 4:24 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: smtpserver
Replies: 5
Views: 1473
Next

Return to advanced search