Code: Select all
InitNetwork() : ExamineIPAddresses()
Debug IPString(NextIPAddress())
I have an ADSL connection that requires logon (ie. not always on) and
my IP address is dynamic, not static -- but it's weird that the values differ.
Code: Select all
InitNetwork() : ExamineIPAddresses()
Debug IPString(NextIPAddress())

Bah, it's only one site.. but if someone had sometime, they could addPB wrote:I just tested this to get my IP address:
But the result is different to what's seen at www.showmyip.com -- why?Code: Select all
InitNetwork() : ExamineIPAddresses() Debug IPString(NextIPAddress())
I have an ADSL connection that requires logon (ie. not always on) and
my IP address is dynamic, not static -- but it's weird that the values differ.
Code: Select all
; English forum: http://jconserv.net/purebasic/viewtopic.php?t=7857&highlight=
; Author: ricardo (based on older Forum code)
; Date: 11. October 2003
; -----------------------
; Modified by NoahPhense
; Date: 27. June 2004
; note: Thought I saw something like this somewhere, but couldn't
; find it, so I modified some old code. This code is meant
; to rip pages. So I'm just parsing the ripped page.
Procedure.s OpenURL(Url.s, OpenType.b)
isLoop.b=1
INET_RELOAD.l=$80000000
hInet.l=0: hURL.l=0: Bytes.l=0
Buffer.s=Space(2048)
hInet = InternetOpen_("PB@INET", OpenType, #NULL, #NULL, 0)
hURL = InternetOpenUrl_(hInet, Url, #NULL, 0, INET_RELOAD, 0)
Repeat
Delay(1)
InternetReadFile_(hURL, @Buffer, Len(Buffer), @Bytes)
If Bytes = 0
isLoop=0
Else
res.s = res + Left(Buffer, Bytes)
EndIf
Until isLoop=0
InternetCloseHandle_(hURL)
InternetCloseHandle_(hInet)
ProcedureReturn res
EndProcedure
URL$ = "http://www.ipaddressworld.com"
HTML$ = OpenURL(URL$, 1)
q.s = Chr(34)
mainString.s = "<font face="+q+"Verdana, Arial, Helvetica, Sans-serif"+q+" size="+q+"+6"+q+">"
mod_1 = FindString(HTML$, mainString, 1)
mod_2.s = Mid(Html$, mod_1, 100)
mod_3 = FindString(mod_2, ">", 1)
mod_4.s = Mid(mod_2, 62, 15)
mod_5 = FindString(mod_4, "<", 1)
mod_6.s = Mid(mod_4, 1, mod_5-1)
MessageBox_(0, "External IP Address :: " + mod_6, "IP", #MB_SYSTEMMODAL)
End
Wish I knew. Never had that occur, ever. I recommend setting fire to thePB wrote:> Bah, it's only one site.. but if someone had sometime, they could add
> more, like backups, if one fails it could move on.. I think there are like
> 4 mainstream ip places...
Hmm, I just checked my IP at these sites, and they say:
www.showmyip.com = 203.26.24.221
www.ipaddressword.com = 203.26.24.222
Update: I just checked my IP address for this post , and it's 203.26.24.214...
and no, I haven't disconnected and reconnected my ADSL connection during
these three tests. So now I'm REALLY confused... which one do I believe?

NoahPhence wrote:Even the expert boards I've been to, say, you need to get the IP from a web page..
Yes, we are experts, experts in the art of gathering and using informationthefool wrote:Isnt this a kind of expert board?