internet ip address

Postby jose_murugosa » Wed Nov 14, 2007 10:33 am

Antonio Linares wrote:José,

Code: Select all  Expand view
   Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... }
     [   2] = N   2


Antonio,
Verdaderamente, no entiendo, yo lo pruebo en mi equipo y me devuelve la IP pública, lo he verificado con "MyIP.es" y el resultado es el mismo.

Quisieras por favor probar el exe que te envío junto con el código fuente correspondiente?

http://www.mediafire.com/?5wd1bu19cdk

Gracias desde ya.
Saludos/Regards,
José Murugosa
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1145
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby Antonio Linares » Wed Nov 14, 2007 10:34 am

Jose,

Probado tu EXE y el mismo error :-(

En Vista 32
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby jose_murugosa » Wed Nov 14, 2007 10:39 am

Antonio Linares wrote:Jose,

Probado tu EXE y el mismo error :-(

En Vista 32


En XP el resultado es este:

Image

Serán diferencias entre sistemas operativos?
Saludos/Regards,
José Murugosa
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1145
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby Antonio Linares » Wed Nov 14, 2007 11:19 am

Posiblemente...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Wed Nov 14, 2007 11:48 am

Richard Chidiak wrote:Antonio,

Unfortunately all the samples above retreive the Local ip code not the internet one


No, my sample retrieve the public IP.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8344
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Nov 14, 2007 11:57 am

Enrico,

Do you use a router ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Wed Nov 14, 2007 1:45 pm

No, just a modem. Anyway, maybe the difference is XP vs. Vista. :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8344
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby James Bott » Wed Nov 14, 2007 2:01 pm

Enrico,

>No, just a modem. Anyway, maybe the difference is XP vs. Vista.

I am using XP Pro and a router. aHosts has a length of 1 and aHosts[1] returns my local IP address not my interent IP address.

It must be that your function only works without a router.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Wed Nov 14, 2007 3:09 pm

Probably.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8344
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Nov 14, 2007 4:10 pm

Yes, thats my guess, that the function is only valid with a modem, not with a router
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41348
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby jose_murugosa » Wed Nov 14, 2007 4:13 pm

Antonio Linares wrote:Yes, thats my guess, that the function is only valid with a modem, not with a router


Probably that is the reason becouse I use a modem too.
Saludos/Regards,
José Murugosa
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1145
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Postby Ugo » Thu Nov 15, 2007 12:09 am

Antonio Linares wrote:Yes, thats my guess, that the function is only valid with a modem, not with a router

Antonio and all fws,
I use a router and Vista business.
The Enrico's function return 3 addresses:
1) my local ip address 192.168.2.100
2) my local ip address 192.168.147.1
3) my local ip address 192.168.172.1

Only the Otto's function return the external IP

With the router, i think that is not present the external ip on the computer.
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

Postby Enrico Maria Giordano » Thu Nov 15, 2007 8:54 am

Ugo wrote:Only the Otto's function return the external IP


Where is the Otto's function? I can't find it in this thread.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8344
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby nageswaragunupudi » Thu Nov 15, 2007 12:18 pm

I tested Mr. EMG's code.

When my pc has two ip addresses, which i can see with ipconfig /all, the funtion returns two element array with two ip addresses.

when ipconfig /all shows only one ip address it returns one element array only
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10277
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Ugo » Thu Nov 15, 2007 8:50 pm

EnricoMaria wrote:
Ugo wrote:Only the Otto's function return the external IP

Where is the Otto's function? I can't find it in this thread.

I'm sorry, I was wrong is the function of Richard Chidiak
Ciao, best regards,
Ugo
User avatar
Ugo
 
Posts: 283
Joined: Sat Oct 15, 2005 6:40 am
Location: Turin, Italy

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 32 guests