Markh789 Posted August 23, 2008 Share Posted August 23, 2008 Hi, I'm currently a new developer to PHP Extensions! I'm possibly wondering if you can cod PHP Extensions in visual basic 6? If not, what in? And what would be the easiest way? Thanks for any reply's, Mark. Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/ Share on other sites More sharing options...
wildteen88 Posted August 23, 2008 Share Posted August 23, 2008 I believe extensions need to be written in C (this what the PHP interpreter is written in). However have a read of the the following Zend Article Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-623794 Share on other sites More sharing options...
Markh789 Posted August 23, 2008 Author Share Posted August 23, 2008 Ok, Well I'm big around security and im trying in place the following code into the extension file. function dllencrypt($str) { $str = sha1(md5(base64_encde($str . $str))); $str = str_replace($str, "a", "b"); $str = str_replace($str, "c", "k"); $str = str_replace($str, "d", "r"); return $str; } Yeah, basically its just a little encryption (Though there is another one that dose the same thing about 20 times) that I will be removing MD5 and designing it all by myself, this is just for testing. How can I place this inside of the extension file? Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-623940 Share on other sites More sharing options...
trq Posted August 24, 2008 Share Posted August 24, 2008 You could start here. Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-624128 Share on other sites More sharing options...
corbin Posted August 27, 2008 Share Posted August 27, 2008 I would think it would be theoretically possible to compile PHP extensions in anything that will compile to byte code. Your only problem would be compiling it against the PHP code.... Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-626606 Share on other sites More sharing options...
Markh789 Posted August 30, 2008 Author Share Posted August 30, 2008 I would think it would be theoretically possible to compile PHP extensions in anything that will compile to byte code. Your only problem would be compiling it against the PHP code.... So your saying, you could do this in visual basic 6 for all that I care? Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-629462 Share on other sites More sharing options...
corbin Posted August 30, 2008 Share Posted August 30, 2008 I'm saying it's possible, but it could be very difficult. Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-629557 Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 But corbin, Zend has TONS of specific macros for memory management and creation of zvals and all sorts of stuff that are written in C, so I think you'd basically have to stick to C for extensions. Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-629782 Share on other sites More sharing options...
corbin Posted September 1, 2008 Share Posted September 1, 2008 True.... I guess the only way really would be if you could make PHP a library, then rebuild PHP, with the non-C extension built against the library version of PHP. Hrmmmm.... So, it probably is possible in the long run, but after DarkWater's comment, I would venture to say you could just learn C 500 times before you would get it to work. Quote Link to comment https://forums.phpfreaks.com/topic/120997-custom-php-extensions/#findComment-631393 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.