forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


is there a better way??

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Tue May 20, 2003 9:52 pm    Post subject: is there a better way?? Reply with quote

Say guys,
is there a better/eaisier way of getting your ip# than this?
maybe piping rezultz to VDS directly?

run winipcfg.exe /batch
list create,1
list loadfile,1,A:\winipcfg.out
repeat
%Z = @NEXT(1)
if @MATCH(1,IP ADDRESS)
%%IP_ADDRESS = @TRIM(@STRDEL(@NEXT(1),1,@POS(":",@NEXT(1))))
else
end
until @NOT(@OK(1))
list close,1
file delete,A:\winipcfg.out

TIA
harry
Back to top
View user's profile Send private message
Hortalonus
Valued Contributor
Valued Contributor


Joined: 15 Mar 2002
Posts: 344
Location: Western USA

PostPosted: Tue May 20, 2003 10:01 pm    Post subject: Reply with quote

From the VDSINET.DLL Help file...

Quote:
@NET(SOCKET, ADDR)
Client/server, auto on/auto off
This returns your IP address.

If you want to use a DLL you should be able to use this function.

_________________
"ah, come take my hand... we're ridin' out tonight to face the promised land"
Get a free iPod mp3 player...
Back to top
View user's profile Send private message Send e-mail
harry
Contributor
Contributor


Joined: 01 May 2003
Posts: 61

PostPosted: Tue May 20, 2003 10:24 pm    Post subject: Reply with quote

Ho,
THANK YOU!! Very Happy Very Happy Very Happy Very Happy Very Happy
i knew that it was the long way home, but
with all these dlls now its hard to know whats in em.
Tanx, Very Happy Very Happy Very Happy
harry
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed May 21, 2003 5:33 am    Post subject: Reply with quote

There's another one - vdsonline.dll which can show you your IP address + online status. Beware though, that
if you are on a network, behind a router/switch etc. there will often be a difference between your local IP and
the external IP which your computer has on the Internet.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed May 21, 2003 9:43 am    Post subject: Reply with quote

You can also make a little PHP script which you can load from the internet. That way you can get your external IP.

Code:
<?
echo "$remote_addr";
?>


You can load that site by using the vdsinet or vdsipp dll.

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Wed May 21, 2003 12:05 pm    Post subject: Reply with quote

He-he. Yeah or

in Perl:
Code:
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "$ENV{REMOTE_ADDR}";


or ASP:
Code:
<% Response.Write Request.ServerVariables(32) %>


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Wed May 21, 2003 12:48 pm    Post subject: Reply with quote

Or you could make a server with VDS which can give you the IP address...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Wed May 21, 2003 2:47 pm    Post subject: Reply with quote

Since all the good answers have been given already here's a not so good
one (depending on the reason you want the IP). At least it's a different
approach.

You can get all the IP info including gateways, DHCP info, MASKS, Lease
info etc. if you know the MAC address of your network connection
(including dialup) from the registry. The keys below should work with NT,
2000 or XP. It's easy enough to find them in 95,98 & ME with a little work.

Get the Mac Address(s) Here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards

The MAC Address is labeled ServiceName and you can load all the connections into a list for processing

Get IPINFO at one of the following:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\{MAC ADDRESS}\Parameters\Tcpip

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{MAC ADDRESS}

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\{MAC ADDRESS}\Parameters\Tcpip


I haven't tried this method personally yet but it does seem do-able and I just HAD to throw in my 2 cents. Smile

moke
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group