Jump to content
  • Advertisement
Sign in to follow this  
Pipo DeClown

[web] Compiled Scripts

This topic is 4868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone inform me about Compiled Webscripts. I'm seeking a way to hide PHP source code from the server by using PHP compiled into binary. Is this possible? What other solutions are (not necessarily PHP) there?

Share this post


Link to post
Share on other sites
Advertisement
anything that can be run on most unix systems if you use apache.

That means anything like perl, python, binaries (C++) .etc as long as it is in the cgi-bin directory and you have the interpreter.

Don't forget to output "content-type:text/html\n\n" before your html though.



#!/bin/sh

echo -en "content-type:text/html\n\n";

echo -en "<p>Hello, World</p>"




http://localhost/cgi-bin/hello

Share this post


Link to post
Share on other sites
There are a couple popular methods using php. One is Zend the other is Ion Cube. I've never used either on my own code but I've used Zend applications before. I can't speak for speed increases but if you're just looking to hide code either should work fine.

Share this post


Link to post
Share on other sites
Hmm.. I was more of hoping to find something like this:

<?php
include_compiled("functions.phpc");

functions_cool();
?>



Perhaps there is a scripting language that can be bound with PHP?

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Hmm.. I was more of hoping to find something like this:*** Source Snippet Removed ***

Perhaps there is a scripting language that can be bound with PHP?


With Zend you have to have the Zend optimizer installed on the server then the compiled files act just like regular php file and can be included like normal. The problem however is the price! If you want to use it directly from php like a normal function call you could look into writing your own php extension (overkill) or look for some more compiler options. I haven't found anything free yet but you might want to check out Source Guardian which is considerably cheaper then Zend Encoder.

Share this post


Link to post
Share on other sites
Hiding PHP's scource code is simply not possible without some kind of application installed that sits between the script and PHP itself... such as the Zend Optimiser or various other script cachers. I've heared good things about MM Chache though.

Share this post


Link to post
Share on other sites
The PHP bytecode compiler is what you're looking for. Although it's still an 'experimental' extension it works great. With a bit of luck it will be incorporated as a standard extension in a future PHP version.

Other than that mmcache (now eAccelerator) will do the trick.

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Thanks for all the resources.. But there isn't much I can do with the servers my clients are on.


Sounds like the only option with PHP then would be the Zend encoder which most servers have installed by default. Worth a look. Too bad it's so expensive.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!