Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
URL validation
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01630233
Message ID:
01630258
Vues:
59
>>>>Hi everybody,
>>>>
>>>>I have a textbox which will allow to enter a valid URL (https or http). Do you know what code should I use for validation of the user's input?
>>>>
>>>>Thanks in advance.
>>>
>>>You only want to br sure that the input is valid or you want to be sure that the site really exists?
>>
>>I think both.
>How about:
>
>DEFINE  FLAG_ICC_FORCE_CONNECTION 1
> 
>DECLARE Long InternetCheckConnection IN Wininet.dll String Url, Long dwFlags, Long Reserved
> 
>* Fast and reliable web site
>lcUrl = youtTextBoxValue
>
>IF InternetCheckConnection(lcUrl, FLAG_ICC_FORCE_CONNECTION, 0) <> 0
>   ? "Valid URL"
>ELSE
>   ? "Can not veryfy the URL"
>ENDIF
>
Thanks, Boris. Testing Tore's code right now, will add this test right after.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform