Click to See Complete Forum and Search --> : IP address (asp.net)


PeOfEo
05-09-2003, 09:50 PM
I am making my own message forum but instead of forcing a user to register to use it, I just want to put the user name to be guest at: then their ip address. I just think it would look very professional and would be cool. But here is the problem, I have been scouring my books and the internet trying to find a suitable script but it is not working out. The only asp.net stuff I have found is xml or it is in the global asax and it ads server variables to a data base. I dont want that at all. So... how can I do this? I have seen java script do it but how can I have java script detect it and then put it in an asp.net label? This has just been confusing me all night, can anyone help? Oh yea what I have for my forum so far is at http://eurohost.webmatrixhosting.net/knights/forum/forum.aspx . It is working now but it still has a lot of cosmetic work to do and I still need to disable the html, but that wont be hard. I will also implement my own bb code sortof. Like [img="bla bla bla"] will break down into [img= = <img src=" and then the ] will be the > but thats just the basic stuff. Any ways I need ip help here

achat
05-30-2003, 06:45 AM
hi,
Your post was very verbose and in all possibility i might have missed ur point. But if you are looking for ways of finding the ipadress of the client m/c then do this in asp.

dim ipaddress
ipaddress=Request.ServerVariables("remote_addr")


Hope this is what ur looking 4.

brendandonhue
05-30-2003, 07:28 PM
I wouldn't do that if I were you. A person's IP address should not be published like that, especially if its a computer-related board. What if someone posted that they have a backdoor virus, and it gave everyone their IP address?

achat
05-30-2003, 11:03 PM
Yup brendan, u r absolutely right. I use it only for usage tracking. This info is not available to the users.

Ribeyed
05-31-2003, 04:37 AM
HI Nick,
the ASP.NET equivalent to remote_addr is UserHostAddress.
It is a property of the Request Intrinsic Object (HTTPRequest Class)

PeOfEo
05-31-2003, 03:50 PM
sorry I didnt reply sooner I could not get to a computer for a while cause I was at our condo which is outa town. Anyways what would the asp.net equivalent be again? Like how would I implement it cause I have never seen it before. I did see some xml that did it and my host supports xml so that would work and I also saw a way of getting server variables through a global file but I didint want to mess with that.