Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture computer name of web users?
Message
 
À
01/03/2004 04:49:47
Information générale
Forum:
Visual FoxPro
Catégorie:
ActiveVFP
Divers
Thread ID:
00881978
Message ID:
00881995
Vues:
28
There's actually a routine in Foxtools that does this with the Win Sockets API:
Who Hit You?
When your Web server is hit from a Web site, how do you know who hit you?
There are three functions added to Foxtools that will help determine
this. It also depends on whether you're on an intranet or the Internet.
These functions call the Win Sockets API to resolve a remote IP Address to a
host name.

Here are the three functions in Foxtools that will resolve IP addresses.

    {"_WSOCKSTARTUP",    (FPFI) WSockStartup, 7,  "I,R,R,R,R,R,R"},
    {"_WSOCKCLEANUP",    (FPFI) WSockCleanup, 0,  ""},
    {"_WSOCKGETHOSTBYADDR",    (FPFI) WSockGetHostByAddr, 2,  "C,R"},

Call _WSOCKSTARTUP and _WSOCKCLEANUP to initialize/uninitialize the Winsock
library. The _WSOCKGETHOSTBYADDR function takes an IP address string
like "123.123.123.123" and resolves it into the name of the machine. 

// store 0 to buff1,buff2,buff3,buff4,buff5,buff6
//?_wsockstartup(256 * 1 + 1,@buff1,@buff2,@buff3,@buff4,@buff5,@buff6)
// integer version, wVersion,wHighVersion,szDescription,szSystemStatus,iMaxSockets,iMaxUdpDg

//?    _wsockgethostbyaddr("123.123.123.123",@buff1)      &&returns 1 on success, 0 on failure
//        ?buff1                && returns the host name
// Note: if the target machine is not available, this call can take a long time.
>Dear all,
>Does anybody know how to capture the computer name of web users who access activevfp websites? IP addresses can be easily captured using the DumpVars functions. Can this function also track the computer name? Thanks in advance.
>Sim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform