Page 2 of 2 <12
Topic Options
#39513 - 2003-04-25 04:05 PM Re: IsInIPRange Function
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
well lads its a success, the damn thing works now and i couldnt have done it without any of you, so many many thanks guys (and girls!) and i'd just like to say what a wonderful resource this bulletin board is, so where do i mail the glenfiddich then??

Cheers Everyone,

Anth

Top
#39514 - 2003-04-25 04:07 PM Re: IsInIPRange Function
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
Jooel Nieminen
tangokuja 4 b 46
40520 JKL
Suomi Finland

[Big Grin]
what was the pending part?
_________________________
!

download KiXnet

Top
#39515 - 2003-04-25 05:11 PM Re: IsInIPRange Function
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
its in the post jooel, and not sure what you mean by the pending part? but just to let you know with all your help guys i've managed to edit the script to work across 18 different centres now, so big well done to everyone and dont worry i've put you all in under the author(s). thanks everyone,
Top
#39516 - 2003-04-25 05:23 PM Re: IsInIPRange Function
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
pending...
I ment what was the last piece you added there to make it work...

just for future references.
_________________________
!

download KiXnet

Top
#39517 - 2003-04-27 04:57 PM Re: IsInIPRange Function
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
oh sorry jooel, i'll post the full code monday morning and let you have a look, thanks for all your help though, i think all i was doing wrong was just not calling the dependencies in correctly (by not including the full path) other than that i simply used your approach and then created a select-case to fill in 18 centres worth, the codes only been tested locally but i'll be testing it this week in each of our centres and i'll let you all know how it goes.

Anth

"He who talks too much and knows very little"

Top
#39518 - 2003-04-27 06:42 PM Re: IsInIPRange Function
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11163
Loc: Boston, MA, USA
Put the list of centers into an .INI file and read it fromt here. Then you can cycle through them and you can easyly adapt your code. example:
code:
; .INI file
[192.168.0.0]
Call=function1
[192.168.1.0]
Call=function2

code:
$networkids=split(readprofilestring('file.ini','','')
$id=0
$done=0
do
if isinsubnet(@IPADDRESS0,$networkids[$id]
$function=readprofilestring('file.ini,$networkids[$id],'Call')
$rc=execute('$rc='+$function+'()')
$done=1
endif
until $id>ubound($networkids) or $done
if not $done
; unidentified network
endif

_________________________
There are two types of vessels, submarines and targets.

Top
#39519 - 2003-04-28 10:37 AM Re: IsInIPRange Function
anthonyalderson Offline
Getting the hang of it

Registered: 2003-03-20
Posts: 52
Loc: England
thanks for the hint jens, i think i will do that in future but for now i'm happy to leave it as is, the code runs fine and takes but a second or two to complete its cycle, but i will do that in a future script, maybe when i begin to revise this one, but thanks again jens, and thanks for all your help with the code itself,

Anth

Top
Page 2 of 2 <12


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 326 anonymous users online.
Newest Members
Praveer, Ollero, rayyo, Foxlicht, DonChild
17742 Registered Users

Generated in 0.035 seconds in which 0.012 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org