TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: josan on September 02, 2013, 01:53:18 PM
-
I need to read a file located on a web server. "https://www.dropbox.com/s/uyrkr4ocpzutijq/Hola.txt".
After searching and find some codes the result is not as expected as in the examples you can read the data that really in the content of the file but in my case not possible.
It will be the destination server?
Thanks for your help ...
Example: (http://www.theswamp.org/index.php?topic=39663.msg449737#msg449737)
(defun vk_GetRemoteText (RemoteFileName / objHTTP Result)
(if (setq objHTTP (vlax-create-object "WinHTTP.WinHTTPRequest.5.1"))
(progn (setq
Result (vl-catch-all-apply
(function
(lambda ()
(vlax-invoke-method
objHTTP "Open"
"GET" RemoteFileName
:vlax-false
)
(vlax-invoke objHTTP "Send")
(vlax-get-property objHTTP "ResponseText")
)
)
)
)
(vlax-release-object objHTTP)
(if (not (vl-catch-all-error-p Result))
Result
)
)
)
)
;;;(vk_GetRemoteText "http://www.opendcl.com/version/version.txt")
;;;(vk_GetRemoteText "https://www.dropbox.com/s/uyrkr4ocpzutijq/Hola.txt")
-
(vk_GetRemoteText "http://dl.dropboxusercontent.com/s/uyrkr4ocpzutijq/Hola.txt")
-
Thanks very friendly ...
Solved!
-
the read-code is great! If you share files with "dropbox" can you see, which computer sharing your files ?
My idea is, to create a license-file in dropbox and then share them with my collegues.
-
Have the "WinHTTP.WinHTTPRequest.5.1" interface possibility to load a dll from dropbox too?
-
http://www.theswamp.org/index.php?topic=33750.msg391249#msg391249
-
Have the "WinHTTP.WinHTTPRequest.5.1" interface possibility to load a dll from dropbox too?
Dirk,
I have tried to see who has downloaded files from DropBox, I did not find it possible. Seems from your post here it is possible, care to share how.
Bruce
-
I need to read a file located on a web server. "https://www.dropbox.com/s/uyrkr4ocpzutijq/Hola.txt".
After searching and find some codes the result is not as expected as in the examples you can read the data that really in the content of the file but in my case not possible.
It will be the destination server?
Thanks for your help ...
Example: (http://www.theswamp.org/index.php?topic=39663.msg449737#msg449737)
(defun vk_GetRemoteText (RemoteFileName / objHTTP Result)
(if (setq objHTTP (vlax-create-object "WinHTTP.WinHTTPRequest.5.1"))
(progn (setq
Result (vl-catch-all-apply
(function
(lambda ()
(vlax-invoke-method
objHTTP "Open"
"GET" RemoteFileName
:vlax-false
)
(vlax-invoke objHTTP "Send")
(vlax-get-property objHTTP "ResponseText")
)
)
)
)
(vlax-release-object objHTTP)
(if (not (vl-catch-all-error-p Result))
Result
)
)
)
)
;;;(vk_GetRemoteText "http://www.opendcl.com/version/version.txt")
;;;(vk_GetRemoteText "https://www.dropbox.com/s/uyrkr4ocpzutijq/Hola.txt")
This function has stopped working and returns an expired certificate message. Does anyone know how to update?
-
I just manually checked the link for the Hola.txt and got a 404 (not found), perhaps they moved the file or removed it altogether.
-
Solved, the system I was testing is that the certificate has expired.
-
Good ajax for lisp language, can it run asynchronously?