Hiding the URL from direct access is not a problem, that is what I already do, the problem is that it is that system I am working on and want to share with others.
Everything goes through a PHP file that does all the communication from the user to the imp, people don’t even see what is being transferred, the only thing they can find is a id and the PHP file. That id is then looked up in a database and depending on what is in there, a string will be generated and it will then be transferred to the imp.
The chance of me screwing up is small, because the URL is not even hard coded in any of the files, it is also put inside the database.
And now when I am at it (to maybe give more understanding of what is going on, and maybe awake some interests), I will tell a bit more about the system.
The system is actually just a web page, which is designed to be accessed from a phone. On that page there will be sub-pages, could be Kitchen, Garage, Living room, Whatever…
On each of those pages there can be buttons, switches, displays (just showing a number from the database or somewhere else).
To set that up a node is created in the database, when creating this node you give it a name, insert the URL, and set what type it is (the system can handle more than just electric imp).
After that you create a switch/button/display, give it a name, assign a node to that switch, set a pin number, and if it is a button, set how many times it should pulse the pin and with what delay.
The last thing to do is to create those sub-pags, here the switches/buttons/displays are assigned to the page, and that’s it.
When any switch or button is pressed, it will look in the database and generate the string needed to be send, to make it do what is set in the action, and then do the call to make things happen.
So I only set the URL once in my database, make a php file that will be able to set up the database on another system, and then it should not be needed for me to ever have to put the url into anything again… BUT, even when the chance is small, I might be up all night and do some silly things, and this is why I what I do, in case I forget to think.