I may or may not have gone overboard attempting to answer a fellow forum member’s question about controlling his Spark Core using PHP but I am here to announce…
I wonder if you can help me. Just a couple of questions from an absolute beginner with PHP. I see that on Github you are optionally downloading a version of Tinker to work with the PHP class. I hope to use this with my current software to work with the variable and function I have already. Do I need to make any modifications to my code for it to work with your PHP class? I have WAMP server installed on my laptop do I simply copy all your files in to a project directory in my webserver to run this system? I notice that the config file is populated with the codes required for access. If I put this system on to a commercial server should I have any concerns over privacy of the data?
I do hope you can help with my questions and sorry if there are screamingly obvious answers,
Hey Clive, glad to see someone interested in using the library! Answers to your questions below:
Do I need to make any modifications to my code for it to work with your PHP class?
No. As long as your code uses Spark.variable and Spark.function you are good to go
I have WAMP server installed on my laptop do I simply copy all your files in to a project directory in my webserver to run this system?
Yes sir! Let me know if you run into issues doing this.
I notice that the config file is populated with the codes required for access. If I put this system on to a commercial server should I have any concerns over privacy of the data?
There are definitely some security concerns to be considered. As long as your server does not allow remote users to download the actual PHP source code you should be fine. Ideally the config .php file would fail (die()) if it was accessed directly but that's a fairly easy change.
Let me know if you have any additional questions. I'm happy to help!
I am very sorry for my slow reply I have been on business trip in China.I cant wait to get this running to see if I can get a system developed. My prototypes are working just great. The functionality has incresed from my original concept but I am nearly ready to launch this to a ready and eager market. I have my system running on MS Access but am looking to move to the WAMP server with a web based system. I am going through a learning curve as I have zero experience with PHP a little experience with mySQL virtually no experience with Apache. I am sure I will be back with questions. Thanks for all the great work you and all the guys put in to this forum.
The only thing that needs to be change (to my knowledge) is that, in the future, we will need to migrate to using the api.particle.io endpoint over the api.spark.io endpoint. Feel free to take a look at the library and shoot me a pull request or post an issue if you encounter a problem!