What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

HTML Form Output To File

dave_w

New member
Hi,

Sorry, as is said, I know just enough to be dangerous.

I have an IoT system that does not have an O/S. I would like to send a GET command to my web site to fetch data from a form on a web page on my web site.

I can create the form just fine, and read and print all the fields. What I haven't figured out from the examples I've looked at is if I can put that data into a file on my web site so that I can GET the data in the form from my IoT.

Admittedly, I'm not sure this can be done. My IoT does not have a server so I can't POST data in the other direction.

Does what I'm trying to do make any sense? Is it possible?

Always trying to learn new things. Thanks for the advice.

Dave

Addendum:

OK, So I now know I can put a file on my web site and fetch it just fine from a browser. So I believe I can do the same with a GET. That would just leave saving a file. (Spoken as if I know what the heck I'm talking about. :) )
 
Last edited:
Glad you figured it out. Would you mind sharing what you ended up doing?
Of course, an obvious question. Again, it pre-supposes I know what the heck I'm doing. But I'll try.

I guess there are 2 issues. One is getting the data into a file, and the second is getting the file from my web site. I found some php examples for creating files and writing to the web site. I'm not running a server (but who knows how this works, you better than me), just saving the file. Then through experimentation I found that I could just GET a file by doing GET <url><filename>. In my lack of knowledge I didn't expect that to work.

So after much attempts, re-attempts, re-re-attempts (repeat N times), I was also able to encrypt the file before saving, then have my IoT fetch the file for configuration on a button push. I have no way to send unsolicited data to my IoT because I have not implemented a server on it, but the user can manually delete the file on my web site.

In the end, that all works great. Now if I could just get the new R4 cert files to load in my IoT (no luck so far), I'll be good to go.

Sorry I didn't post this previously.

Dave
 
Of course, an obvious question. Again, it pre-supposes I know what the heck I'm doing. But I'll try.

I guess there are 2 issues. One is getting the data into a file, and the second is getting the file from my web site. I found some php examples for creating files and writing to the web site. I'm not running a server (but who knows how this works, you better than me), just saving the file. Then through experimentation I found that I could just GET a file by doing GET <url><filename>. In my lack of knowledge I didn't expect that to work.

So after much attempts, re-attempts, re-re-attempts (repeat N times), I was also able to encrypt the file before saving, then have my IoT fetch the file for configuration on a button push. I have no way to send unsolicited data to my IoT because I have not implemented a server on it, but the user can manually delete the file on my web site.

In the end, that all works great. Now if I could just get the new R4 cert files to load in my IoT (no luck so far), I'll be good to go.

Sorry I didn't post this previously.

Dave
No worries! I was just curious to see what you did.

I admittedly have very limited experience with this sort of thing but I could see it coming up in some form, so thanks for sharing!

Wish I could help with cert files but good luck :)
 
Back
Top