I am pleased to announce that I dove into this new idea last night
and made my first proof-of-concept program (PoC-1) for this new
programming environment (which I am calling LocalPHP for the lack of
a better name, any suggestions?).
The proof-of-concept is very crude! It simply brings up a dialog
with an IWebBrowse2 ActiveX component in it and points the browser to
a file called "index.php". It then intercepts the fetch, processes
the index.php into index.htm and redirects the browser to index.htm.
Yes, this is very crude and not how I intend to do things long term!
The curious redirecting is important because index.php contains a
link to index2.php. When the user takes the link and the browser
tries to fetch index2.php, the code again intercepts the request,
converts index2.php into index2.htm and then redirects the browser.
As you may recall, I had expressed a hesitancy to open sockets so the
program could communicate with itself. It turns out that this will
not be neccessary. In fact, I did not even have to load Apache into
the system as I had originally assumed. Instead, I just use PHP
stand-alone to process the .php files.
Plans for PoC-2:
The next proof-of-concept is coming along very nicely! Instead of a
dialog, I'm using a full, resizable window (CHtmlView). Instead of
converting .php files into .htm files, I want to pipe .php files into
PHP and then pipe the result into the browser. I've also begun some
research into how we will be able to control the window (menus,
status bar, etc.) from within the browser. There are indeed some
hooks we can use, so it shouldn't be too difficult.
I am extremely excited about this project and think that it could be
valuable to lots of people. It is my hopes that this will someday be
embraced by the PHP community and used world-wide.
Immediate needs:
In the meantime, I do need some help to get rolling. I have the PHP
source and binaries, but there is so much code that I get a bit dizzy
when I look at it! What I want to do is stick the php4ts.dll (I am
supposing that would be the best choice) binary into my project and
then pipe data in and out of it. Can someone PLEASE give me some
hints as to how I can do this? I'm sure it's easy, but I don't know
where to start. I've never even tried to put someone else's DLL into
my code.
For reference, it appears that the browser can accept IStream class
objects as input. I understand that this is probably not what
php4ts.dll uses, but I am willing to do whatever massaging I need to
make that work. If anyone has messed with these before and would
like to volunteer input, I'd love to hear it ([EMAIL PROTECTED] or
via this forum).
Micro$oft is a tumor in the computer world:
Finally, I beat my head for several hours against one bug last night.
It involved converting a tagVARIANT (I'd never seen such a struct
before) into a simple null-terminated-string. I'm sure this sort of
thing is easy to do. It has to be, right? Surely I'm not the first
person to want to manipulate tagVARIANT's. Anyhow, I couldn't figure
out how to do it and was forced to write a very crude conversion
routine to keep me from slitting my wrists. Does anyone out there
know the CORRECT way to do this? I do not want to leave this hack in
the code.
Let me know what you think!
Gre7g.
=================================================================
Gre7g Luterman [EMAIL PROTECTED] http://www.templeofluna.com/
Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm
It's sad that a family can be torn apart by something as simple
...as a pack of wild dogs.
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]