Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IP numbers
Message
De
21/04/2011 19:49:20
 
 
À
21/04/2011 19:40:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01508084
Message ID:
01508091
Vues:
53
>>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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform