I have a nifty stack that keeps a field with metacarfd cgi script in it,
each card has the HOST, USER, PASS word for the site and a button script
uploads the script to the site and set CHMOD to 755 and another button to
"Get URL" to "trigger the cgi and return results to another field.. Another
field keeps URLCoded sample data as it would be input from a regular web
form and I can post that to the CGI and return the results... this is all
very efficient and have been able to eliminate an FTP client and a browser
in CGI development and debugging. in fact it is a "quantum leap" over the
old procedure (go to browser, fill form submit, check results,  go back to
BBEdit, fix CGI, upload to site etc...very "painful"...)  And since we don't
have telnet access to the virtual host, this is really the only way to go...
ultimately one would like to get rid  of the "raw" socket scripts being used
and depend on the resident libURL scripts as these are upgraded, while the
raw socket script is not...(not that the FTP Protocol is going to change
over nite... but still...)

but The issue is the CHMOD part of this... so, this is a feature request to
add this to the libURL.  Here is the section from the raw socket that does
the job... should be simple enough to create a handler in the libURL to do
this.

 envisioned is some syntax like this:

put "755" into tPermissions
CHMOD(tPermissions) url ""ftp://"&gUser&":"&urlEncode(gPass)&"@"&
gHost&gPath&gFilename

OK, the raw socket excerpt reads like this ( think this is only doable in
Passive mode with this syntax, hacked from Andu's FTP client last year...):

## assumes you have completed uploading the data
## so then you close the data connection

  close socket tIP 

## where socket tIP was built from the server assigned
## IP:port on start up to which all data was written


## control connection is still open
    read from socket Q for 1 line #for confirmation
    put  cr & it before fld "log"

## now the fun part
## assume a path like:   "public_html/cgi-bin/" & tCgiFileName
## where no host, user etc is declared... you already have an open socket
## then simply:

    write "SITE CHMOD 755 " &  iPath & crlf to socket Q
## now exit
    read from socket Q for 1 line #for confirmation
    put  cr & it before fld "log"
    write "QUIT" & crlf to socket Q
    read from socket Q for 1 line #for confirmation
    put  cr & it before fld "log"
 ## OK now we are really done...
    closesocket Q

Now I can live with the raw socket for now as I don't except FTP protocols
to be undergoing any radical changes in the near future...but in the long
run better to just call this from the libURL as we are quite sure Dave Cragg
knows much better what he is doing that we do! And this would allow those
who have no desire to learn to write sockets to manage CGI's without an FTP
client... or telnet... It really works great.

Thanks

Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 

_______________________________________________
improve-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/improve-revolution

Reply via email to