Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
URL validation
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01630233
Message ID:
01630258
Views:
53
>>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform