PHP DLL files

Probably a quick procedure to doing the following.

I'm trying to protect my source code, and I was looking over at eBay's website, how they use a eBay.dll file to access their web functions.

Right now, I have 1 file, index.php which contains all my page functions. I want to be able to store all this into a .dll file, and have it run from my web server. What is the procedure for doing this?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't believe you can turn your page into a dll in PHP. To do so would require a PHP Compiler.

If you want to protect your source code, I'd recommend looking into other solutions such as the Zend Encoder, or IonCube Encoder.

There are a few others too, but I'd recommend using one of the above.

Zend Costs more, but gives you more obscure code, that is extremely difficult(much more difficult than DLL's) to reverse engineer.

If you do want to make a DLL, you'll have to code it in C, using the Zend API.
Giovanni GCTOCommented:
You missed the point. Dlls have nothing to do with PHP, they are usually written in c++. You can, however, precompile/obfuscate your source code.
The best one is surely the Zend Optimizer, but its license cost is very very high. There are cheaper ones, still commercial and good software, like
There are at the end, free php obfuscating tools, but those i checked out are not much worthy. Please let me know if you find something free working well.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If you really want to make DLL Files to use with PHP, check out the

Bare in mind however that you will not be able to make DLL's in PHP itself yet.
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference ithrough the Colors of STEM program.

One package I forgot about was bcompiler.

I believe it will only work with classes however.

Check out
drakkarnoirAuthor Commented:
Yes, what are some good free ones?
bcompiler is free. Any other product that encodes PHP into a way that it can't be reversed, costs money AFAIK.
Hi !
It might be not related to this question, but Does any one know how to create php extension dlls for windows, like the dlls found in the extenstions folder of php installation for windows

Giovanni GCTOCommented:
You need to write them in c. You can find plenty of examples in the php distribution, under the ext/ directory.
Hi meet_zorrer

Check out the link I posted on my second link, which brings you to documention on the Zend API. It describes how to make php extension DLL's
Hi darkarnoir

Thanks for the accepting my comment regarding bcompiler, as assisted, but I can't figure out how you consider ThG's first post(which you accepted as "Accepted Answer" to be more helpful than my first post.

From what I can see they contain the exact same information(and the exact same suggestions), except that mine was posted two minutes before hand.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.