Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
URL validation
Message
 
 
À
26/01/2016 17:08:37
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:
01630266
Vues:
63
Doesn't seem to work reliably.

I tried invalid URL first, then valid URL, then http://stackoverflow.com/questions/161738.com (invalid) and it didn't give me any message.

>
>local m.url,m.Result
>m.url="https://www.levelextreme.com/ViewPageGenericLogin.aspx"
>
>DECLARE INTEGER InternetCheckConnection IN wininet   STRING lpszUrl, INTEGER dwFlags, INTEGER dwReserved 
>#DEFINE FLAG_ICC_FORCE_CONNECTION  1 
>
>LOCAL llResult 
>m.lResult = (InternetCheckConnection(m.URL, FLAG_ICC_FORCE_CONNECTION, 0) = 1)
>if m.lResult=.t.
>messagebox("Valid URL",0+32+4096,'',1000)
>else
>messagebox("inValid URL",0+32+4096,'',1000)
>endi
>
>
>see also this:http://www.sourcecodester.com/tutorials/c/7296/url-validation-using-c.html
>if you can translate to vfp (regExp)
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform