I don't know of many ways. I'd look around in the class HTTPSocket.
Offline
lallaway12 wrote:
Look in the scratch sorce
... He said he was tired of using the autoIT script and he wanted to do it in Squeak, or in the source code ...
Offline
Offline
jvvg wrote:
MathWizz wrote:
HTTP post?
If possible, I'd like to avoid that.
(On pretty much every web host I can find, they have relatively small POST limits)
However, aside from external applications, it may be the safest way.
After all, Insanity (i bet that's what you're gonna use it for
) is open source, so if you put ftp details in a scratch mod, someone could decompile it and find them.
The only other way i can think of is to have it upload to a "temp" website, and then the program sends a signal to the main website, which then pulls the project from the temp website without compromising any sensitive info besides the temp site ftp account, which shouldn't matter if that is the only thing on there.
Another option I haven't heard much about is HTTP PUT. I don't know the exact details of that though....
Last edited by SJRCS_011 (2012-07-25 19:18:08)
Offline
SJRCS_011 wrote:
jvvg wrote:
MathWizz wrote:
HTTP post?
If possible, I'd like to avoid that.
(On pretty much every web host I can find, they have relatively small POST limits)However, aside from external applications, it may be the safest way.
After all, Insanity (i bet that's what you're gonna use it for) is open source, so if you put ftp details in a scratch mod, someone could decompile it and find them.
The only other way i can think of is to have it upload to a "temp" website, and then the program sends a signal to the main website, which then pulls the project from the temp website without compromising any sensitive info besides the temp site ftp account, which shouldn't matter if that is the only thing on there.
Another option I haven't heard much about is HTTP PUT. I don't know the exact details of that though....
Yeah, I was going to use a temp site.
Offline
I don't know how secure this would be, but you could have a PHP script on your server:
<?php
$fp = fopen("test.sb", "w");
fwrite($_REQUEST['fcontents'], $fp);
fclose($fp);
?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
Offline
GP1 wrote:
I don't know how secure this would be, but you could have a PHP script on your server:
Code:
<?php $fp = fopen("test.sb", "w"); fwrite($_REQUEST['fcontents'], $fp); fclose($fp); ?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).
Offline
jvvg wrote:
GP1 wrote:
I don't know how secure this would be, but you could have a PHP script on your server:
Code:
<?php $fp = fopen("test.sb", "w"); fwrite($_REQUEST['fcontents'], $fp); fclose($fp); ?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).
but i bet scratchr.org still has a limit.
Offline
SJRCS_011 wrote:
jvvg wrote:
GP1 wrote:
I don't know how secure this would be, but you could have a PHP script on your server:
Code:
<?php $fp = fopen("test.sb", "w"); fwrite($_REQUEST['fcontents'], $fp); fclose($fp); ?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).
but i bet scratchr.org still has a limit.
Yes, but it is probably bigger.
Offline
jvvg wrote:
GP1 wrote:
I don't know how secure this would be, but you could have a PHP script on your server:
Code:
<?php $fp = fopen("test.sb", "w"); fwrite($_REQUEST['fcontents'], $fp); fclose($fp); ?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).
But my theoretic method isnt uploading anything. Your writing a file, not uploading a file. However, your host might have a limit to how big you can write your files (although that would seem silly)
Offline
GP1 wrote:
jvvg wrote:
GP1 wrote:
I don't know how secure this would be, but you could have a PHP script on your server:
Code:
<?php $fp = fopen("test.sb", "w"); fwrite($_REQUEST['fcontents'], $fp); fclose($fp); ?>Then in Squeak you would send data (GET or POST, wouldn't matter but POST allows more data via http) to that script, with a parameter fcontents. The parameter would hold the file contents (still in binary form). Well, that's theoretic, I've never tried it.
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).
But my theoretic method isnt uploading anything. Your writing a file, not uploading a file. However, your host might have a limit to how big you can write your files (although that would seem silly)
I think that the only limiting factor for the uploader is POST limits.
Offline
jvvg wrote:
GP1 wrote:
jvvg wrote:
The problem is that the web host I use has a limit on how big an uploaded file can be and how long it can take to upload it (8MB and 30 seconds). Because of that, I would need FTP (unless we move Mod Share to ScratchR.org).But my theoretic method isnt uploading anything. Your writing a file, not uploading a file. However, your host might have a limit to how big you can write your files (although that would seem silly)
I think that the only limiting factor for the uploader is POST limits.
I think only GET has a limit.
Offline
GP1 wrote:
jvvg wrote:
GP1 wrote:
But my theoretic method isnt uploading anything. Your writing a file, not uploading a file. However, your host might have a limit to how big you can write your files (although that would seem silly)I think that the only limiting factor for the uploader is POST limits.
I think only GET has a limit.
Only on the server.
I looked at the server configuration, and it also has the following values in it:
upload_max_filesize (8MB, limit for files submitted)
post_maxsize (1MB or so, limit on POST data that is not files)
max_execution_input_time (or something like that, 30 seconds, which means that if an upload takes longer than 30 seconds, connection is cut off)
Offline