Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IP numbers
Message
From
21/04/2011 19:49:20
 
 
To
21/04/2011 19:40:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01508084
Message ID:
01508091
Views:
52
>>I've been trying to use incrementing ip numbers to access the web.
>>Here's a bit of code with which I've been noodling.
>>
>>
>>A = 75
>>B = 124
>>C = 92
>>D = 71
>>D = D + 1
>>IF D > 255
>>D = 1
>>C = C + 1
>>ENDIF
>>IF C > 255
>>C = 1"
>>B = B + 1
>>ENDIF
>>IF B > 255
>>B = 1
>>A = A + 1
>>ENDIF
>>IF A > 255
>>QUIT
>>ENDIF
>>*IPOutput = "HTTP://" + A + "." + B + "." + C + "." + D
>>IPOutput = "HTTP://" + LTRIM( STR( A ) ) + "." + LTRIM( STR( B ) ) ;
>  + "." + LTRIM( STR( C ) ) + "." + LTRIM( STR( D ) )
>>IPOutput = ALLTRIM(IPOutput)
>>
>>
>>I'm trying to mix numbers and strings to come up with a working IP. Any ideas? or solutions? appreciated.
>
>Also, zero is a valid octet value e.g. 75.125.0.1 is legit.

Thanks Al.
I ain't skeert of nuttin eh?
Yikes! What was that?
Previous
Reply
Map
View

Click here to load this message in the networking platform