devWhiz Posted May 12, 2011 Share Posted May 12, 2011 I've tried to use this http://www.bambalam.se/bamcompile/ .. but I cant get curl to work using the option to set the extension.. I need it to be able to sign into myspace or facebook with curl when it is in an exe.. everything else works fine with bambalam, everything but curl and connecting to an mysql db, I dont need to have mysql support, only curl.. what would be the easiest way to make this happen? btw the exe should just open a CLI and run the script, thanks Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/ Share on other sites More sharing options...
jonsjava Posted May 12, 2011 Share Posted May 12, 2011 try batch: @echo off set PATH=%PATH%;"C:\PATH_TO_PHP_EXEC" start php -q some_file.php Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214754 Share on other sites More sharing options...
jonsjava Posted May 12, 2011 Share Posted May 12, 2011 actually, to make it modular: run_php.bat @echo off set PATH=%PATH%;"C:\Path to PHP" set runme=%1 start php -q %runme% USAGE: change the "C:\Path to PHP" to the path to your PHP install then run it as such: run_php.bat some_php_file.php Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214757 Share on other sites More sharing options...
devWhiz Posted May 13, 2011 Author Share Posted May 13, 2011 what do you mean "run it as such " run_php.bat some_php_file.php Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214870 Share on other sites More sharing options...
devWhiz Posted May 13, 2011 Author Share Posted May 13, 2011 Hmm, it didnt compile it into an .exe, any help is appreciated,, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214873 Share on other sites More sharing options...
jonsjava Posted May 13, 2011 Share Posted May 13, 2011 this doesn't make an EXE. It is a batch file. A script that windows will execute line-by-line. You will still need the PHP files, but if this isn't going to be a packaged-up deal, it should work just fine. Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214874 Share on other sites More sharing options...
devWhiz Posted May 13, 2011 Author Share Posted May 13, 2011 Oh, I'm trying to get something that compiles the php file into an exe, so no one can view the code in the script Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214877 Share on other sites More sharing options...
trq Posted May 13, 2011 Share Posted May 13, 2011 There are plenty of PHP compilers around, have your searched Google? Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214884 Share on other sites More sharing options...
devWhiz Posted May 13, 2011 Author Share Posted May 13, 2011 Yes sir I sure have, the only I have had semi success with was the bambalam compiler, and it doesnt seem to want to work with cURL after its in .exe format... do you have anything in mind for me thorpe? Thanks for the replies btw Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214889 Share on other sites More sharing options...
trq Posted May 13, 2011 Share Posted May 13, 2011 Ive never bothered with any compilers, don't really see the point sorry. Quote Link to comment https://forums.phpfreaks.com/topic/236275-best-way-to-turn-a-php-script-into-an-executable/#findComment-1214935 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.