Go Back  Xtreme Visual Basic Talk > Other Languages > Web Programming > getting remote IP Address?


Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2007, 08:42 AM
Meridian2000 Meridian2000 is offline
Contributor
 
Join Date: Jul 2003
Location: London/England
Posts: 565
Default getting remote IP Address?


I've seen on some forums and webpages "Your IP is logged" how do they do this? is it something simple I can use on my own website?
__________________
Bumshanka - May the seed of your loins be fruitful in the belly of your woman - The Young Ones
Reply With Quote
  #2  
Old 11-20-2007, 05:56 PM
Robert Collins Robert Collins is offline
Contributor
 
Join Date: May 2004
Posts: 695
Default

I don't know how members are able to do it which I have seen but for you to do it on your own Web Site is easy since all Web Sites record the IP of the visitor in the Environmental List. It's been too long for me to remember how to access this list but it's there and I know I used to do it using a CGI program but it may also be possible to access it using embedded Java or VB or PHP code in the document itself. Someone will visit this thread and post the answer. Sorry I just don't remember how.
Reply With Quote
  #3  
Old 11-21-2007, 12:01 AM
the master's Avatar
the master the master is offline
Tachikoma
 
Join Date: Mar 2003
Location: Mansfield, UK
Posts: 4,594
Default

I only have an answer for PHP.

$_SERVER["REMOTE_ADDR"]

"The IP address from which the user is viewing the current page."

Theres more stuff about $_SERVER here
__________________
"That which seems simple is often overlooked" ~ me
Halloween Special FX
Web Hosting from Spook Technologies
Reply With Quote
  #4  
Old 11-21-2007, 02:52 AM
Meridian2000 Meridian2000 is offline
Contributor
 
Join Date: Jul 2003
Location: London/England
Posts: 565
Default

if at all possible I'd like the solution in vbscript, I'd like to use the resulting variable to save to a database
__________________
Bumshanka - May the seed of your loins be fruitful in the belly of your woman - The Young Ones
Reply With Quote
  #5  
Old 11-21-2007, 03:18 AM
the master's Avatar
the master the master is offline
Tachikoma
 
Join Date: Mar 2003
Location: Mansfield, UK
Posts: 4,594
Default

Hmm. I would recommend using javascript instead of VBscript for compatibility.

I found this link on google. I cant open it here because its blocked by my works proxy but it looks like it should work. It does say IE5+ though so again its bad for compatibility.

As for saving to a database then i dont know. Usually things like that are done using a server side script like PHP/ASP etc.

It would be a lot easier to use PHP to do the whole thing. Using VBscript reduces compatibility and if everything is processed on the client side then someone could easily fake their IP
__________________
"That which seems simple is often overlooked" ~ me
Halloween Special FX
Web Hosting from Spook Technologies
Reply With Quote
  #6  
Old 11-26-2007, 08:01 AM
Meridian2000 Meridian2000 is offline
Contributor
 
Join Date: Jul 2003
Location: London/England
Posts: 565
Default

that's great, thanks
__________________
Bumshanka - May the seed of your loins be fruitful in the belly of your woman - The Young Ones
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->