I have an application that is written in PHP, and I was wondering how I could have the application send information to a remote server (mine) to tell the server that it has been installed, and how the server would receive it. I could use a database, but then how would I know that the entry is from an actual user and not just someone putting false information in there, but then again, I suppose they could do that anyway, and I suppose that it wouldn't really matter. Basically what I want is for the application to send me what they have set as their URL and what they have the site's title set to. Obviously it would eventually be stored in a database, but should the database entry be from the site that's sending info or the one getting it.
Basically what I am looking for is the best way to do this. Thanks.
I would create a RESTful JSON web service in PHP which is always online. It receives the url and the title when your app gets installed. You need to do what you want with the incoming data on the service itself, e.g. store in database. Make sure this part is working first and that data is saving before moving on to trying to use it within your application.
Then in PHP application you can make a CURL request to the service by POSTing the title and url when it gets installed.
If you are talking about wordpress plugins then your code is public and it would be obvious to anyone who looks at your code that a service call is made upon installation. It would be easy to spoof and is hard to prevent. The solution is to try to obfuscate the part of the application that makes the CURL request.