Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IP numbers
Message
From
21/04/2011 19:40:37
 
 
To
21/04/2011 19:29:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01508084
Message ID:
01508088
Views:
68
>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.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform