Website programming advice
Don M
Posts: 1,653
I want to be able to upload data to / download data from a webpage of my own. I have a device that I made (uses a prop ) that is connected to a smartphone and I want to "push" data from my device through the smartphone through the web to my webpage and also receive data from my webpage through the smartphone.
What I need to understand is what is needed to allow data to be uploaded to a webpage. You can think of it as some simple fields being sent for example- name;number1;number2. Would only be a few fields. I want to understand and learn how to do this and program my own webpage so I am interested in what programming language should be used to create the webpage? I have the domain name and a static site page already. Is there a certain type of server that should be used (requested)?
I am pretty green at this as you can tell but hopefully this discussion will evolve into something more understandable.
I just need some direction here so I know where to look for information & books etc.
Thanks.
Don
What I need to understand is what is needed to allow data to be uploaded to a webpage. You can think of it as some simple fields being sent for example- name;number1;number2. Would only be a few fields. I want to understand and learn how to do this and program my own webpage so I am interested in what programming language should be used to create the webpage? I have the domain name and a static site page already. Is there a certain type of server that should be used (requested)?
I am pretty green at this as you can tell but hopefully this discussion will evolve into something more understandable.
I just need some direction here so I know where to look for information & books etc.
Thanks.
Don
Comments
Anyway web sites were run on the UNIX operating system and a MySQL database was used and Perl programming language "cgi" scripts were used on web pages. Then a Microsoft Access database could be used as a "front end" to that MySQL web server database via ODBC.
The following folks do this kind of stuff and would be able to tell you what the latest thing(s) are...
http://www.pair.com
I am not committed to any language at this point so looking for further guidance.
Even if you decide afterwords to go to an IIS server, you can still use PHP and MySQL through an addon. I did this in Windows 7 by enabling a few featurs that are disabled by default, although it was a beta before it went public. It should even be possible in the Home Versions, provided you have the install disks. Great for testing.
I have no idea how GoDaddy's Ruby on Rails implementation is. I have an account with http://hostingrails.com for $120 prepaid annually. It's going on four years now and they've been fine as a webhost. I just looked at their site and it looks like they have some kind of promotion where you get a year of free service. I haven't read the fine print, though, so caveat emptor.
I never set up a big Rails installation on my site, just some experimentation. I just looked at a test site I haven't looked at in over two years and it still works.
If you want to learn Rails, the definitive book IMHO is http://pragprog.com/titles/rails4/agile-web-development-with-rails. Be sure to get the fourth edition because it covers the newest version of Rails.
Can you tell us more about the connection from your Prop device to your smartphone? IP? Bluetooth? Serial?
Keep us posted on your project!
Thanks!
Rick
@Rick- Bluetooth.
But there is quite a lot to that as well. MySQL is a relational database and you talk to it with "queries" which are worded like this...
SELECT firstname, lastname, address, age FROM friends WHERE firstname='%s' AND lastname='%s'
And THAT can be a lot of learning on its own... However you can "cheat" with that wording. If you use Microsoft Access as a "front end" to MySQL via ODBC, you can use it to create tables, queries, etc. And it is a LOT easier to do this using Access.
You can use the visual part of access with drop down boxes, etc. to create a query, then click on SQL View and there is the SQL wording for you! It would just need a little modification to use in a script, but the basic wording is there.
Also there is free software called "Open Office". I think that has a database as well. I don't know if that has all the same features as Access or not?
Anyway that could save you some time having to learn the SQL language...
somedomain.com/script.php?command=forward&speed=100
In the page (script) itself it is not hard to parse out the variables for "command" which would = "forward" and "speed" which would = 100.
The question is what are you doing with the information collected? You could for example, simply have the page resend the data on to another 'net enabled device (like a Spinneret), or you could "store" the data, etc. MySQL is one way to store data (and it is NOT as hard as bill190 makes it out to be, and your hosting company will have all that set up and ready to go; but there is a bit of learning curve). If the data is saved then another script might "read" the data when your phone sends the query to the site.
If you are storing trival amounts of data, then you could sidestep the whole database issue and just write the data to a simple text file -- that file could be "read" by one script and "written" by another. See "fopen" and "fwrite" in the PHP documentation.
The only real caveat for all of it -- make sure to preprocess any variable values submitted to the page/script -- this is where nasty folks with evil agendas will try to exploit vulnerabilities to upload their own code (generally so they can not deface your site, but rather, use your hosting account for disseminating malware and sending spam). Again, the PHP documentation (http://php.net) has a really good, brief section on security during form submissions that has simple examples for basic protections.
I am wondering if there are any Google apps that may already accommodate this type of application.... ?
As a matter of fact, you can download PHP/Apache/MySQL too.
There's really no reason to rent host space until you're ready to deploy. Especially, since this is a proof of concept. What kind of computer and operating system do you have?
I'm not sure. You'd need to flush out your app a little more.
Download Visual Studio Express and play around. You can always uninstall later.