Re: The Get-Post option...
I think what you are looking for is an FTP upload? post userList to url http://www.someurl/list.txt; There are more than two methods, e.g. GET and POST. There are also other methods which get much less press than the two former ones. The PUT method, for instance, allows one to store content on a server as a [new] file. Ahhh, now we're talking. When I saw GET and POST, I assumed that POST meant PUT but for the internet. I am used to GET and PUT being opposite sides of the same coin, one reads, the other writes. So seeing GET and POST, it seemed logical that POST worked as PUT did. If I can keep a running list on the internet that gets updated from within Metacard, that would be awesome, especially if it can be done without risking opening a hole on my site. -- --Shareware Games for the Mac-- http://www.gypsyware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
you need to make sure that your webserver supports file uploads, and then you'll need to take a look at where the file gets transfered to.. (in PHP it gets uploaded to the TEMP folder and needs to get moved after).. -Sean I believe it does. But this opens up another question... using FTP to upload files, wouldn't that mean my program would have to have my username and password built into it? Doesn't sound like a very secure option. I've been hearing some rather disturbing things about using options that let people upload or change files on my website. It sounds like if I do anything where I must set the file permissions to read/write it could open up a very serious security hole. My web host says that people could theoretically upload actual programs that would execute and that could do all sorts of things both to my website and out into the world at large, and actually create worms and viruses that run from my website. As for moving a file from the TEMP folder, can this also be done from .php? Can the TEMP folder be read as any other URL can? -- --Shareware Games for the Mac-- http://www.gypsyware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
I think you are misunderstanding the meaning of post. POST sends a request in POST-format to a url, e.g. a CGI app. I think what you are looking for is an FTP upload? put userList into url ftp://www.someurl.com/list.txt; OR If you had a CGI that adds a name, you could do something like: get url http://www.someurl.com/list.cgi?name=urlEncode(newUserName) post userList to url http://www.someurl/list.txt; Yes the whole POST command in MC is not very well documented. So I was guessing as to what it did. I figured if GET could get the contents of a web page or text file, then perhaps POST would in effect create one. Guess not. Actually I have not done one thing as yet... which is to surf the net for CGI scripts for this... It sounds like they do exist. -- --Shareware Games for the Mac-- http://www.gypsyware.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
Hello Shari, I think you are misunderstanding the meaning of post. POST sends a request in POST-format to a url, e.g. a CGI app. Both methods ( GET and POST ) submit a request to a web server. Plus the responding appl on the server-side is not necessarily using the CGI protocol. You could use GET or POST to request a PHP page with the form elements as parameters to PHP page-generaion process. The GET method sends these parameters, e.g. EXTRA info, appended to the URL. This URL and its extra information are visible to the user, limited in length, constrained in terms of content (allowed chars) but, the nice thing about them is that they can be bookmarked. SearchEngins use GET so that you can bookmark your search ; not just the page. The POST method sends the EXTRA information appended to the request message as you would attach an attachment to an e-mail message. The extra information does NOT appear in the URL. You cannot bookmark the extra info, as you can with GET, but the URL is clean, the information is more secure because it's less visible, there can be far mor information included with a POST than you could ever put into a URL. I think what you are looking for is an FTP upload? post userList to url http://www.someurl/list.txt; There are more than two methods, e.g. GET and POST. There are also other methods which get much less press than the two former ones. The PUT method, for instance, allows one to store content on a server as a [new] file. Actually I have not done one thing as yet... which is to surf the net for CGI scripts for this... It sounds like they do exist. Right you are, Shari. All you need is a basic MC-based CGI stack; which you can find in MetaCard's tutorials, in the list's archives and, therefore, in the minds of many of your fellow MC-netizens as well. Once you got the basic CGI working, script it so that it creates the file[s] you wish. If it seems way too easy, notably for those of you with some Java experience, then I guess that's why MC stacks/apps could be considered as unsafe in environments requiring security. The web and Java do NOT normally allow writing-to-the-disk with the notable exception of cookies. Have fun! Alain __ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
I believe it does. But this opens up another question... using FTP http uploads bypasses the need for ftp.. to upload files, wouldn't that mean my program would have to have my username and password built into it? Doesn't sound like a very no user/password required (unless you wanted).. if I do anything where I must set the file permissions to read/write it could open up a very serious security hole. My web depending on the operating system your web host is running (if it's a unix flavour or a winNT-type OS) you can always have them set the directory to write only (no read, no execute) and this would stop people from running programs.. As for moving a file from the TEMP folder, can this also be done from .php? yup.. and you have to, otherwise the file in the TEMP folder is deleted once your php script is done running.. Can the TEMP folder be read as any other URL can? not usually.. if your hosting place allows for it then yes, but usually it's only readable from the server end (ie. php) and not the client end (ie. MSIE, opera) -Sean ps.. again, feel free to contact me off-list if there's something that you need help with.. ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
Shari, I think you are misunderstanding the meaning of post. POST sends a request in POST-format to a url, e.g. a CGI app. I think what you are looking for is an FTP upload? put userList into url ftp://www.someurl.com/list.txt; OR If you had a CGI that adds a name, you could do something like: get url http://www.someurl.com/list.cgi?name=urlEncode(newUserName) post userList to url http://www.someurl/list.txt; ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
On 2/13/04 1:01 PM, Shari [EMAIL PROTECTED] wrote: Actually one of the first options I tried was to simply update a text file on my website, using Metacard. The file permissions are set to Read and Write. However, the script fails: on mouseUp get url http://www.someurl/list.txt; put it into userList put return SMITH after userList # so far, so good post userList to url http://www.someurl/list.txt; get url http://www.someurl/list.txt; answer it end mouseUp If you're trying to write a file on the server, I believe you'd have to use FTP here, or you can review this: http://lists.runrev.com/pipermail/use-revolution/2001-December/000506.html (Of course, there are some issues being discussed right now in the news about assembling this type of string but for the moment you're probably OK.) Regards, Scott Rossi Creative Director Tactile Media, Development Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.com ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: The Get-Post option...
you need to make sure that your webserver supports file uploads, and then you'll need to take a look at where the file gets transfered to.. (in PHP it gets uploaded to the TEMP folder and needs to get moved after).. -Sean ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard