Hi everyone, awhile back i had someone put together a license project for me. Basically it is a down and dirty little script that i use to verify my members license for another script. This was written originally as a quick bandaid to a need with plans of making it better later, well later has now arrived. 
Since this was originally written for php4 i thought it way over due to upgrade it. He was nice enough to put some php5 stuff in here and i have added that but Sadly this older gentlemen has passed away and that resource is no longer available.
Basically how it works is that when i sell some of my software i include this snippet file. Then that page is encoded. Every time that member uses that software the first thing it does is connect with my db to see if the license is valid. If so all is well, if not well then they cannot run the software.
The problem with this process is that it leaves an open db connection backdoor access which is why it works in the first place. But that also can be dangerious.
I have been doing some thinking and reading up on some possible improvements. One is to adapt a similar verify process that paypal uses with its ipn listener. The other one is to look at adapting or connecting to some part of the ftp process in order to borrow some the already installed security that comes with ftp. I am thinking that at least if im using the ftp then i can filter and manage that connection. Anything would be better than having a raw open connection at this point.
So my question here is this. What is the best way to manage such a connection. Are there php5 specific functions? I posted this here rather than in mysql because i am thinking it is more of a server connection management question than it is a db question.
just fyi, basically whats in the file is the following
db login info (raw login actual username db, pw)
db connection
query process
text replies approved or not.
its very basic structure and process.

Since this was originally written for php4 i thought it way over due to upgrade it. He was nice enough to put some php5 stuff in here and i have added that but Sadly this older gentlemen has passed away and that resource is no longer available.
Basically how it works is that when i sell some of my software i include this snippet file. Then that page is encoded. Every time that member uses that software the first thing it does is connect with my db to see if the license is valid. If so all is well, if not well then they cannot run the software.
The problem with this process is that it leaves an open db connection backdoor access which is why it works in the first place. But that also can be dangerious.
I have been doing some thinking and reading up on some possible improvements. One is to adapt a similar verify process that paypal uses with its ipn listener. The other one is to look at adapting or connecting to some part of the ftp process in order to borrow some the already installed security that comes with ftp. I am thinking that at least if im using the ftp then i can filter and manage that connection. Anything would be better than having a raw open connection at this point.
So my question here is this. What is the best way to manage such a connection. Are there php5 specific functions? I posted this here rather than in mysql because i am thinking it is more of a server connection management question than it is a db question.
just fyi, basically whats in the file is the following
db login info (raw login actual username db, pw)
db connection
query process
text replies approved or not.
its very basic structure and process.
Comment