Results 1 to 7 of 7

Thread: sending Message to another ASP. possible?

  1. #1

    Thread Starter
    Lively Member Cerebrate's Avatar
    Join Date
    May 2000
    Posts
    82

    Red face

    is it possible to send a string to another user who is viewing my web page?
    or just to check if they are on line or something.




    Cerebrate

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264

    Cool

    Well,
    I am not sure what you mean by that..

    but what you can do (in case you know their IP address before hand) is that the page would send you an Email when ever they come in.

    I think that the most you can get, but again, you have to know their IP address, this mean that they should have a static IP which not too many people have ..

    If you want any more information about that, just ask.
    :-)
    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

  3. #3

    Thread Starter
    Lively Member Cerebrate's Avatar
    Join Date
    May 2000
    Posts
    82

    Red face This is what I am trying to do.

    Thanks.

    I want to create a chatroom-like page. but user doesn't have to logon to show their ID, I will get their IP and determain myself.
    I will create a textbox to let user send message to all other user who's viewing the page. the message only shows in part of the page (it's not just a chatroom).
    any suggestions about how to do that??
    do I need to keep refreshing my page?


    Cerebrate

  4. #4
    Guest

    Thumbs up Client/Server

    I'm not up on ASP, but when the client (webbrowser) requests a URL off the server (webserver), the client has to tell the server what its IP is. Surely ASP has some environment variables that are defined during this request/transaction. So I would say you can do it. BUT if you don't reply with your string during the current request, potentially the IP can be different/invalid for your needs.

  5. #5
    New Member
    Join Date
    Jun 2000
    Location
    Pennsylvania
    Posts
    6

    Thumbs down sorry

    I don't think you would be able to do this because of changing IP addresses. If your friend logged in today, with IP address... 123.43.211.32 and tomarrow he logged on as 123.43.201.43. you would not be able to recognize him. Now if you were going by session and not just because they are your buddies, then it may be possible, and yes, you would have to continually refresh the page so that anything sent would then be shown on your page, that is inevitible.

    The best way to do something like this is to have a database that holds the quote and when they resubmit, you can then have the database be read and display that message to the screen.

    Zandura

    [Edited by Zandura on 06-22-2000 at 04:27 PM]

  6. #6

    Thread Starter
    Lively Member Cerebrate's Avatar
    Join Date
    May 2000
    Posts
    82

    Red face here is another Q.

    thanks all.
    well, I know how to get their IP now, I know most of them are dynamic, but I will try to tell who they are(maybe by cookies).
    anyway I need to keep refreshing my page.
    so.
    How can I keep refreshing my page?

    BTY, how do you post your code with that kind of effect in this board?

    thanks again

    Cerebrate

  7. #7
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I amaze myself sometimes!


    This will refresh the page every 5 seconds.

    put this in a file called 'refr.asp'

    Code:
    <%@ Language=VBScript %>
    <HTML>
    <SCRIPT LANGUAGE="JavaScript"><!--
    function startTimer() {
    	setTimeout('refresh()',5000);
    }
    
    function refresh() {
        window.location.href = 'refr.asp';
    }
    
    startTimer();
    //--></SCRIPT>
    
    </HEAD>
    <body onload="startTimer()">
    <%
    Response.Write now()
    %>
    
    
    </BODY>
    
    </HTML>
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width