This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Creeper9207's profile picture

WebData, store program data on the real internet! (rednet replacement)

Started by Creeper9207, 15 April 2015 - 02:15 AM
Creeper9207 #1
Posted 15 April 2015 - 04:15 AM
http://pastebin.com/tUjmVZEc <-api pastebin
or pastebin get tUjmVZEc webdata

this creates a literal file on my webserver, please do not abuse this and keep the channels to a minimum, i have the right to delete anything big or abusive without asking and am not responsible for loss of data! be aware

Past that, this was made for stuff like ftps and chat programs and includes two simple methods:
data_set(string channel, string data) //sets data
data_get(string channel) // gets data

example usage:

os.unloadAPI("webdata")
os.loadAPI("webdata")
webdata.data_set("cc_test", "random data")
print(webdata.data_get("cc_test"))

other notes:
when posting data avoid using the pattern ":S:", its the replacement for spaces
free for all to use! use it in your os! (don't upload the os -_-/>)
use it in chat programs!
use it in ftp clients! (please clear the file afterward by setting it to nothing)
scince it uses actual internet it works between servers and/or across the REAL world

php syntax, just in case, this should work with other things than just cc:
Spoilerdata_set syntax: http://creeper9207.c...set.php?number=[channel]&amp;&amp;data=[data (spaces represented with ":S:")]
data_get syntax: http://creeper9207.c...get.php?number=[channel]
Edited on 23 April 2015 - 09:05 PM
MKlegoman357 #2
Posted 15 April 2015 - 01:38 PM
Interesting.. You know that you can use textutils.urlEncode to safely encode the url parameter without manually replacing spaces with :S: or whatever? Also, I'd suggest adding a character limit, if you haven't set that already.
Creeper9207 #3
Posted 15 April 2015 - 09:50 PM
I'll look into the encode thing, also, I don't have a character limit and won't have one, people hate being restricted
But I reserved the right to delete anything immensely huge, and ban any spamming ips

I would also like to see this used in computercraft "web servers" &amp; clients, consider this a replacement for rednet

Also, have data you don't want overwritten?
Contact me and I'll give you you're own file extension! I might even look into encrypting it for you, but I can't guarantee total data security

DO NOT PUT REAL PASSWORDS OR INFORMATION IN THIS! IT IS NOT ENCRYPTED AT THIS TIME AND IS NOT MADE FOR STORING INFORMATION SECURELY! IT IS MADE TO TEMPORARILY STORE SMALL TO MEDIUM BITS OF DATA AND/OR PERMANENT SMALL PIECES OF DATA!

IF YOU DO PUT PASSWORDS OR USERNAMES IN THIS PLEASE WARN USERS AND ENCRYPT THIS DATA
Edited on 16 April 2015 - 01:53 AM
Creeper9207 #4
Posted 23 April 2015 - 11:05 PM
updated title: removed word "logins"
DannySMc #5
Posted 28 May 2015 - 03:01 PM
I wouldn't personally say this is good enough to be made for ftps or OS's I made a ftp a while ago, which allows you to login and see your files as a list… Idk very basic, add more to it to make it more functional and secure, and the idea is I wouldn't use it if you're gonna delete stuff when and as you please….
Creeper9207 #6
Posted 28 May 2015 - 10:58 PM
this is now unsupported