AutoLISP / LISP write to file on web server

Not sure if anyone can help. I am programming using AutoLISP .... coming from LISP, but with a few extra features. It is used internally by a program called AutoCAD.

Anyway, I have code that can be read from a text file on a web server, but I want to know how to write to a file too ..... if possible.

This is what I have to read the file:

(defun c:read ()
(setq server "http://example.com.au/Folder/")
(setq SetFile "testpost.txt")
(setq Filepath (strcat server SetFile))


(setq xml (vlax-create-object "MSXML2.XMLHTTP.3.0"))
(vlax-invoke-method xml 'open "POST" Filepath :vlax-false)
(vlax-invoke-method xml 'send)
(setq strSunday (vlax-get-property xml 'responsetext))
)

      

Any ideas on how to use the code I need to write back?

thank

+3


source to share


1 answer


You need to write something on the server, which will make the HTTP request and save it. This is the semantic purpose of POST requests, but you need to write or install a program on the server to do the job. Since I know PHP, I would write a PHP program to listen for POST requests and save the content or specific parts of the content. It makes sense?



0


source







All Articles