PDA

View Full Version : http require or includes???


troyd
08-12-2009, 10:11 PM
I am sure this is a dumb question. And I might not be asking it at all correctly. But is there a way to have a required file on a different server than the application is running?

My reason for asking is this...
I would like to prevent something that has recently happened to me. I spent quite a bit of time working on an application in php for a client. Once I had it just the way they wanted it, they locked me out of their server and now they have a copy of my folder of files. I'm not sure if they know what to do with them, but my guess anyone who they hire will figure it out enough to continue where I left off.

They have promised to delete the files, but I have no idea if they did. Long story short, they "hired" me to create a section to their web site that they were having trouble doing themselves. At first it was just simple stuff and some graphics. But soon turned into a need for a database and a dynamic list of records. So I created what they wanted using DA. After they were charged for my time, they tell me that they are closing the site for personal reasons and can't settle with me.

So I got to thinking. If I had a bulk of the code on my server with an include or require, this would/might protect me a little in the future. Is this even possible or allowed in php?
I have searched and studied my books with no success.
I have experimented with it but I kept getting errors. Any reference would be appreciated. And if this can't be done, are there any other tricks to protect your work?

Thanks,
Troy

CraigR
08-12-2009, 10:59 PM
It seems a shame that a developer should have to jump through hoops to protect their hard work.

Personally, I would seek legal advice if I felt I had been unfairly treated, as from what you have said, it isn't just the code the client could keep. but it looks like they owe you payment.

Dave Buchholz
08-13-2009, 01:28 AM
For anybody else reading this I highly recommend building clients sites on a staging server so that the client can see progress and test as necessary but has no access to the files until payment is received.

One very important line of my contract reads:
All files will held on our staging server until full payment is received.

troyd
08-13-2009, 09:16 AM
Yes, I agree on both accounts. We are working on getting payment from them. And we did develop this on a staging server first. It was originally a very small application. However, once it was installed on their server, changes were made and it grew in size. I should have known better.

I am assuming that I can not protect future work with an external require file or authentication of some kind? I don't even know what that would be called if it did exist, so I am having trouble searching for it.

Thanks,
Troy

Dave Buchholz
08-13-2009, 05:24 PM
You could try a PHP obfuscator. It turns normal, easy to read PHP code into gibberish. This google search brought up lots: http://www.google.co.uk/search?hl=en&client=firefox-a&rls=org.mozilla:en-US:official&hs=dJQ&ei=Wq6ESrWWKIXSjAeZq5iPCA&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=php+obfuscation&spell=1

troyd
08-14-2009, 11:00 PM
Thank you. I am checking out a few of the links now. I had not heard of this, so it helps to know the term to search for.

Troy