Simple ASP to give IP/time/username?

Discussion in 'ASP General' started by GregO, Apr 5, 2007.

  1. GregO

    GregO Guest

    I am new to ASP and would like to know if anyone has a page that will
    display username, time, IP
    TIA - Grego
    GregO, Apr 5, 2007
    #1
    1. Advertising

  2. GregO

    Evertjan. Guest

    GregO wrote on 05 apr 2007 in microsoft.public.inetserver.asp.general:

    > I am new to ASP and would like to know if anyone has a page that will
    > display username, time, IP


    Yes we have.

    =======================

    If you are interested how to programme such things in ASP vbscript or
    jscript, please say so and we can help you with some ASP tutorials.

    Or start here:

    <http://tutorials.aspfaq.com/>

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Apr 5, 2007
    #2
    1. Advertising

  3. GregO

    Steve Embry Guest

    Hi Grego-

    VBSCRIPT:

    <%=now()%> --- will return the time and date
    <%=date()%> --- will return the date
    <%=month()%> --- will return the month
    <%=weekday(date())%> --- returns the current day


    ...and here's a simple vbscript file which will pull all server variables for
    a client...just put it in your website and oenit in a browser to see what is
    available--

    <%

    Dim zz(55)

    Dim zzdef(55)

    zz(1)="ALL_HTTP"

    zzdef(1)="are all HTTP headers sent by the client. "

    zz(2)="ALL_RAW"

    zzdef(2)="retrieves all headers in the raw-form. "

    zz(3)="APPL_MD_PATH"

    zzdef(3)="retrieves the metabase path. "

    zz(4)="APPL_PHYSICAL_PATH"

    zzdef(4)="retrieves the physical path corresponding to the metabase path. "

    zz(5)="AUTH_PASSWORD"

    zzdef(5)="is the value entered in the client's authentication dialog. "

    zz(6)="AUTH_TYPE"

    zzdef(6)="is the authentication method that the server uses to validate
    users. "

    zz(7)="AUTH_USER"

    zzdef(7)="is the raw authenticated user name. "

    zz(8)="CERT_COOKIE"

    zzdef(8)="is an unique ID for client certificate which is returned as a
    string. "

    zz(9)="CERT_FLAGS"

    zzdef(9)="is where bit0 is set to 1 if the client certificate is present,
    and bit1 is set to 1 if the certifying authority of the client certificate
    is invalid. "

    zz(10)="CERT_ISSUER"

    zzdef(10)="is the issuer field of the client certificate. "

    zz(11)="CERT_KEYSIZE"

    zzdef(11)="is the number of bits in Secure Sockets Layer connection key
    size. "

    zz(12)="CERT_SECRETKEYSIZE"

    zzdef(12)="is the number of bits in the server certificate private key. "

    zz(13)="CERT_SERIALNUMBER"

    zzdef(13)="is the serial number field of the client certificate. "

    zz(14)="CERT_SERVER_ISSUER"

    zzdef(14)="is the issuer field of the server certificate. "

    zz(15)="CERT_SERVER_SUBJECT"

    zzdef(15)="is the subject field of the server certificate. "

    zz(16)="CERT_SUBJECT"

    zzdef(16)="is the subject field of the client certificate. "

    zz(17)="CONTENT_LENGTH"

    zzdef(17)="is the length of the content header as sent by the client. "

    zz(18)="CONTENT_TYPE"

    zzdef(18)="is the data type of the content. "

    zz(19)="GATEWAY_INTERFACE"

    zzdef(19)="is the revision of the CGI specification used by the server. "

    zz(20)="HTTP_ACCEPT"

    zzdef(20)="returns the value of the Accept header. "

    zz(21)="HTTP_ACCEPT_ENCODING"

    zzdef(21)="returns the value of the Accept encoding. "

    zz(22)="HTTP_ACCEPT_LANGUAGE"

    zzdef(22)="returns a string that specifies the language to be used for
    displaying content. "

    zz(23)="HTTP_CONNECTION"

    zzdef(23)="returns a string containing information about the connection. "

    zz(24)="HTTP_COOKIE"

    zzdef(24)="returns the cookie string that was included with the request. "

    zz(25)="HTTP_HOST"

    zzdef(25)="returns a string containing information about the host. "

    zz(26)="HTTP_REFERER"

    zzdef(26)="returns a string containing the original URL when a redirect has
    occurred. "

    zz(27)="HTTP_USER_AGENT"

    zzdef(27)="returns a string describing the browser used to send the request.
    "

    zz(28)="HTTP_UA_PIXELS"

    zzdef(28)="returns a string detailing the screen resolution of the user
    agent. "

    zz(29)="HTTP_UA_COLOR"

    zzdef(29)="returns a string with color information. "

    zz(30)="HTTP_UA_OS"

    zzdef(30)="returns a string stating the operating system of the user agent.
    "

    zz(31)="HTTP_UA_CPU"

    zzdef(31)="returns a string stating the processor type used by the user
    agent. "

    zz(32)="HTTPS"

    zzdef(32)="returns ON if the request came in through secure channel or OFF
    if the request is through a non-secure channel. "

    zz(33)="HTTPS_KEYSIZE"

    zzdef(33)="is the number of bits in Secure Sockets Layer (SSL) connection
    key size. "

    zz(34)="HTTPS_SECRETKEYSIZE"

    zzdef(34)="is the number of bits in server certificate private key. "

    zz(35)="HTTPS_SERVER_ISSUER"

    zzdef(35)="is the issuer field of the server certificate. "

    zz(36)="HTTPS_SERVER_SUBJECT"

    zzdef(36)="is the subject field of the server certificate. "

    zz(37)="INSTANCE_ID"

    zzdef(37)="is the ID for the Internet Information Server (IIS) instance in
    text format. "

    zz(38)="INSTANCE_META_PATH"

    zzdef(38)="is the metabase path for the instance of Internet Information
    Server (IIS) that responds to the request. "

    zz(39)="LOCAL_ADDR"

    zzdef(39)="returns the server address on which the request came in. "

    zz(40)="LOGON_USER"

    zzdef(40)="is the Windows account that the user is logged into. "

    zz(41)="PATH_INFO"

    zzdef(41)="is extra path information as given by the client. "

    zz(42)="PATH_TRANSLATED"

    zzdef(42)="is a translated version of PATH_INFO that takes the path and
    performs any necessary virtual-to-physical mapping. "

    zz(43)="QUERY_STRING"

    zzdef(43)="is the query information stored in the string following the
    question mark (?) in the HTTP request. "

    zz(44)="REMOTE_ADDR"

    zzdef(44)="is the Internet Protocol (IP) address of the remote host making
    the request. "

    zz(45)="REMOTE_HOST"

    zzdef(45)="is the name of the host making the request. "

    zz(46)="REMOTE_USER"

    zzdef(46)="is an unmapped user-name string sent in by the user. "

    zz(47)="REQUEST_METHOD"

    zzdef(47)="is the method used to make the request. "

    zz(48)="SCRIPT_NAME"

    zzdef(48)="is a virtual path to the script being executed. "

    zz(49)="SERVER_NAME"

    zzdef(49)="is the server's host name, Domain Name Server (DNS) alias, or
    Internet Protocol (IP) address. "

    zz(50)="SERVER_PORT"

    zzdef(50)="is the port number to which the request was sent. "

    zz(51)="SERVER_PORT_SECURE"

    zzdef(51)="is a string that contain a 1 if the request is being handled on
    the secure port, otherwise it is 0. "

    zz(52)="SERVER_PROTOCOL"

    zzdef(52)="is the name and revision of the request information protocol. "

    zz(53)="SERVER_SOFTWARE"

    zzdef(53)="is the name and version of the server software that answers the
    request and runs the gateway. "

    zz(54)="URL"

    zzdef(54)="is the base portion of the URL."

    for a=1 to 54

    response.write zz(a) & "=" & request.servervariables(zz(a)) & "<BR>" &
    zzdef(a) & "<BR><BR>"

    next

    %>






    "GregO" <> wrote in message
    news:...
    > I am new to ASP and would like to know if anyone has a page that will
    > display username, time, IP
    > TIA - Grego
    >
    Steve Embry, Apr 5, 2007
    #3
  4. GregO

    Evertjan. Guest

    Steve Embry wrote on 05 apr 2007 in
    microsoft.public.inetserver.asp.general:

    > Hi Grego-
    >
    > VBSCRIPT:
    >
    > <%=now()%> --- will return the time and date
    > <%=date()%> --- will return the date
    > <%=month()%> --- will return the month


    does not. Try: month(now)

    > <%=weekday(date())%> --- returns the current day
    >




    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Apr 5, 2007
    #4
  5. GregO

    GregO Guest

    On 6 Apr, 00:01, "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot
    com> wrote:
    > this looks like it will list all variables
    >
    > http://www.aspkey.net/aspkey/_blog/index.asp?giorno=5&month=3&year=2007
    >
    >
    >
    > "GregO" <> wrote in messagenews:...
    > >I am new to ASP and would like to know if anyone has a page that will
    > > display username, time, IP
    > > TIA - Grego- Hide quoted text -

    >
    > - Show quoted text -


    Brilliant, for everything I need now. Thanks very much for the links,
    info and quick lesson....its not as hard as I thought after all.
    Cheers - Grego
    GregO, Apr 10, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
  2. grocery_stocker
    Replies:
    10
    Views:
    621
    Keith Thompson
    May 25, 2005
  3. Shailesh Patel
    Replies:
    0
    Views:
    448
    Shailesh Patel
    Nov 8, 2006
  4. nix

    Simple username checking

    nix, Jun 7, 2005, in forum: ASP General
    Replies:
    1
    Views:
    94
  5. Charlotte
    Replies:
    3
    Views:
    125
    Anthony Jones
    Oct 3, 2007
Loading...

Share This Page