Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote File Exists?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2012
Network:
Windows NT
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01607766
Message ID:
01608233
Views:
36
I got it working. Just had to set

#DEFINE WWVERSION_NUMBER "Version 4.61"
#DEFINE INTERNET_OPTION_IGNORE_OFFLINE 0

And it's working fine...

Thank again Rick.

Cyrus

>What version are you running?
>
>There should be no version comparison. wwHttp doesn't use wwipstuff.dll except for form variable encoding/decoding. Errors related to constants usualy point at missing wconnect.h file though.
>
>+++ Rick ---
>
>>Hi Rick;
>>
>>Good to hear from you. Couple things;
>>
>>- When I run this code, its looking for WWVERSION_NUMBER to match the DLL version. What should I use for that? I know there is a way to get the version # of the wwHTTP, maybe you can help me with that?
>>
>>- I used a different HttpGet module (I think the package was called VisualSoft), It worked for years, then it started intermittently getting JUNK instead of 404. So I would get False Positives. Never was able to figure out if it was the HttpGet module malfunctioning or the Servers returning the junk??.
>>So, I gave up and started using the wwFTP instead.
>>
>>Cheers;
>>Cyrus
>>
>>
>>>An even easier way and more universal maybe using HTTP is to just hit the URL where the file might exist via http and then check for an HTTP 404 error (Not found). Http since it's stateless is easier and doesn't require an FTP server.
>>>
>>>
>>>DO wwHttp  && load libs
>>>
>>>LOCAL loHttp as wwHttp
>>>loHttp = CREATEOBJECT("wwHttp")
>>>
>>>loHttp.HttpGet("http://west-wind.com/wconnect/InvalidFile.html")
>>>
>>>*** "Not Found"
>>>? loHttp.cErrorMsg
>>>
>>>*** "404"
>>>lcStatus = loHttp.cResultCode
>>>? lcStatus
>>>
>>>IF lcStatus = "404"
>>>   ? "File not found on server"
>>>ENDIF
>>>
>>>
>>>Depends though whether you can get at the flles you need to via either HTTP or FTP... Either requires a server.
>>>
>>>+++ Rick ---
>>>
>>>>What's the best way to see if a certain "Remote file Exists?" (in a folder such as /public_html/images)
>>>>Using HTTP or FTP or however else. Doesn't matter.
>>>>
>>>>Been working hard on writing code for WinINet to do the same thing. So far, I've got the ftp connection, changing folders, etc. all working.
>>>>But for the life of me, I can't figure out how to use the FtpFindFirstFile() function. Just not enough description or sample code to understand it.
>>>>
>>>>Any help would be greatly appreciated.
>>>>
>>>>Thanks.
Cyrus Nima
-------------------
cyrusnima@gmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform