Re: [PHP] PHP without a webserver

2001-04-15 Thread Yasuo Ohgaki
You can use PHP for many purposes.

You can use PHP
- General scripting language. (Use GCI binary with -q option. You may need
other setting to meet your purpose)
- GUI Application development (USE PHP-GTK)

Refer to following link for PHP-GTK

http://gtk.php.net/

There is compiler (I don't use it so I'm not sure if it is a really a compiler
or not) for PHP that works under Windows. Look for my post in mailing list
archive for URL. (I think you can find, if you search "Compiler" as keyword.)

Regards,
--
Yasuo Ohgaki


""Plutarck"" [EMAIL PROTECTED] wrote in message
9b9qu0$786$[EMAIL PROTECTED]">news:9b9qu0$786$[EMAIL PROTECTED]...
 I've heard much about how PHP is far more than just a language for web
 programming, and I agree. I agree enough that I would like to actually try
 it. I'd like to use PHP scripting in a C/C++ program that doesn't need a
 webserver as an intermediary. I basically want to use PHP in a
 standalone/TCP-IP program rather than having to build a whole "IMF-esk"
 hairball myself.


 Are there any articles or documentation which focuses, or at least would
 give me useful information, on how such a task would be accomplished? I'm
 looking at the API documentation itself which will be helpful, but is there
 anything a little more "pointed" than that?

 I'd love to see PHP grow an arm of offline scripting. It would just be
 _perfect_ for compiling high-level developer-friendly scripts into a format
 usable for 3D real-time environment manipulation, for instance.



 --
 Plutarck
 Should be working on something...
 ...but forgot what it was.





 --
 PHP General 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]



-- 
PHP General 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]


RE: [PHP] PHP without a webserver

2001-04-14 Thread Jeroen Wesbeek

well actually you could compile php4
on it's own so you get a php executable which
you can use as an interpreter for php4 scripts...
no webserver needed


dowebwedo
Jeroen Wesbeek
.programming
Nieuwekade 213 | 3511 RW Utrecht
The Netherlands
p 030 2380544 | f 020 8632045


[roses are red, violets are blue,
 I am schizophrenic and so am I ]


-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: zaterdag 14 april 2001 19:53
To: PHP is not a drug.
Subject: Re: [PHP] PHP without a webserver


Hi Plutarck,

@ 11:37:09 AM on 4/14/2001, Plutarck wrote:

 I've heard much about how PHP is far more than just a language for
 web programming, and I agree. I agree enough that I would like to
 actually try it. I'd like to use PHP scripting in a C/C++ program
 that doesn't need a webserver as an intermediary.

It doesn't. You don't have to have a web server installed in order to
use PHP.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please do not carbon copy me on list replies.



-- 
PHP General 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]

-- 
PHP General 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]




RE: [PHP] PHP without a webserver

2001-04-14 Thread Les Neste

Can anybody comment on PHPTriad?  This appears to be PHP+MySQL+Apache for
the Windows desktop.  

At 07:51 PM 4/14/2001 +0200, Jeroen Wesbeek wrote:
well actually you could compile php4
on it's own so you get a php executable which
you can use as an interpreter for php4 scripts...
no webserver needed


dowebwedo
Jeroen Wesbeek
.programming
Nieuwekade 213 | 3511 RW Utrecht
The Netherlands
p 030 2380544 | f 020 8632045


[roses are red, violets are blue,
 I am schizophrenic and so am I ]


-Original Message-
From: Brian Clark [mailto:[EMAIL PROTECTED]]
Sent: zaterdag 14 april 2001 19:53
To: PHP is not a drug.
Subject: Re: [PHP] PHP without a webserver


Hi Plutarck,

@ 11:37:09 AM on 4/14/2001, Plutarck wrote:

 I've heard much about how PHP is far more than just a language for
 web programming, and I agree. I agree enough that I would like to
 actually try it. I'd like to use PHP scripting in a C/C++ program
 that doesn't need a webserver as an intermediary.

It doesn't. You don't have to have a web server installed in order to
use PHP.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please do not carbon copy me on list replies.



-- 
PHP General 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]

-- 
PHP General 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]




Les Neste  678-778-0382  http://www.lesneste.com

-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Plutarck

Ah, even better. However, how would the script be passed to PHP? As a
command line argument?


--
Plutarck
Should be working on something...
...but forgot what it was.


"Jeroen Wesbeek" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 well actually you could compile php4
 on it's own so you get a php executable which
 you can use as an interpreter for php4 scripts...
 no webserver needed


 dowebwedo
 Jeroen Wesbeek
 .programming
 Nieuwekade 213 | 3511 RW Utrecht
 The Netherlands
 p 030 2380544 | f 020 8632045


 [roses are red, violets are blue,
  I am schizophrenic and so am I ]


 -Original Message-
 From: Brian Clark [mailto:[EMAIL PROTECTED]]
 Sent: zaterdag 14 april 2001 19:53
 To: PHP is not a drug.
 Subject: Re: [PHP] PHP without a webserver


 Hi Plutarck,

 @ 11:37:09 AM on 4/14/2001, Plutarck wrote:

  I've heard much about how PHP is far more than just a language for
  web programming, and I agree. I agree enough that I would like to
  actually try it. I'd like to use PHP scripting in a C/C++ program
  that doesn't need a webserver as an intermediary.

 It doesn't. You don't have to have a web server installed in order to
 use PHP.

 -Brian
 --
  PGP is spoken here: 0xE4D0C7C8
  Please do not carbon copy me on list replies.



 --
 PHP General 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]

 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Brian Clark

Hi Plutarck,

@ 2:11:35 PM on 4/14/2001, Plutarck wrote:

 Ah, even better. However, how would the script be passed to PHP? As
 a command line argument?

Install the CGI executable of PHP in c:\php

In your autoexec.bat:

SET PATH=c:\php;%PATH%

Reboot.

From the command line:

php -q script.php

And read about $argc and $argv. If you're familiar with C, those
shouldn't be a problem.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.



-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Plutarck

Ahh, so it's the location of the script that get's passed.

Now, if the script was coming from a program, is there a way to hand the
file directly to PHP, or will a temporary file have to be used?

So if a user filled in a form and clicked a button in the program, the
program would toy with the form a little, then send the form to PHP. Is that
possible using the CGI executible?


--
Plutarck
Should be working on something...
...but forgot what it was.


"Brian Clark" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Plutarck,

 @ 2:11:35 PM on 4/14/2001, Plutarck wrote:

  Ah, even better. However, how would the script be passed to PHP? As
  a command line argument?

 Install the CGI executable of PHP in c:\php

 In your autoexec.bat:

 SET PATH=c:\php;%PATH%

 Reboot.

 From the command line:

 php -q script.php

 And read about $argc and $argv. If you're familiar with C, those
 shouldn't be a problem.

 -Brian
 --
  PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.



 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Brian Clark

Hi Plutarck,

@ 2:40:28 PM on 4/14/2001, Plutarck wrote:

 Ahh, so it's the location of the script that get's passed.

Yes:

% cat test.php
?php

while(list($i,$arg) = each($argv))
{
  print "$i: $arg\n";
}

?

% php -q test.php a b c d e f g
0: test.php
1: a
2: b
3: c
4: d
5: e
6: f
7: g
%

 Now, if the script was coming from a program, is there a way to hand the
 file directly to PHP, or will a temporary file have to be used?

I have no idea. What language? Using system() in C and Perl, I'm
sure you could concoct something. Why would you want to do that?

 So if a user filled in a form and clicked a button in the program, the
 program would toy with the form a little, then send the form to PHP. Is that
 possible using the CGI executible?

I have no idea what you're talking about here, but if you're wanting
to build some type of GUI based application you might as well either
use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web
server.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.



-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Plutarck

Btw, thanks for all your answers to far ;)

 I have no idea. What language? Using system() in C and Perl, I'm
 sure you could concoct something. Why would you want to do that?


A move recently being made by game programmers has been to move an
increasing amount of work into a scripting engine. My idea is to jump ahead
of the slow move, so that the program is far more abstracted.

The program, written in C/C++ (or Java, or any language really), is
basically turned into a dumb bot. It's a mindless intermediary. The outer
layer is the Display Engine, which could be a Quake Engine or an MFC style
GUI, which takes all of it's commands from the intermediary layer.

The final layer is the scripting engine. In the script if a move_elevator()
function is called, the script interpreter bundles up some commands and
passes it over to the intermediary layer. The intermediary looks at the
display engine, figures out what commands must be called to fufill the
wishes of the script, and passes over the commands.

This would allow the vast majority of the real "content" of a game or
application to be written in a scripting language, much like web apps are
now. The script would run just as well on Linux as it would on windows.

The intermediary understands the universally written script, and figures out
how to actually do what the script asks it to. So an entire application
could be written to run using OpenGL, DirectX, and a selection of different
engines. So you could switch from using a Quake engine to a Midtown Madness
engine for maximum effectiveness, only by tweaking the intermediary level.
Since there are only so many ways to "rotate camera", code could be reused
to the point that the intermediary level comes packaged with all it needs to
know. And thus the sheer amount of people who have the ability to run such
applications skyrockets.


The creators of the Dark Forces star wars game (correct name?) created a
specific programming language for doing things like moving elevators,
dialog, etc. Now adays everyone has their own script.

Asheron's Call has their own little internal quest scripting, and Ever Quest
made their own, Doom has one, Daggerfall has some, et al. But why go to the
trouble of making a whole stinking language, reinventing the wheel, when
thousands of people have spent years to develop a versitile and extensible
scripting engine in PHP?


Anyway, that's my idea. I'd just be happy to outsource some of my C++ work
to PHP. If I use MFC, goodbye platform independence. If I don't use it, it's
a huge pain in the butt to do heavy string manipulation. So I figure, why
not just have PHP do it, since I already know the language?



--
Plutarck
Should be working on something...
...but forgot what it was.



"Brian Clark" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Plutarck,

 @ 2:40:28 PM on 4/14/2001, Plutarck wrote:

  Ahh, so it's the location of the script that get's passed.

 Yes:

 % cat test.php
 ?php

 while(list($i,$arg) = each($argv))
 {
   print "$i: $arg\n";
 }

 ?

 % php -q test.php a b c d e f g
 0: test.php
 1: a
 2: b
 3: c
 4: d
 5: e
 6: f
 7: g
 %

  Now, if the script was coming from a program, is there a way to hand the
  file directly to PHP, or will a temporary file have to be used?

 I have no idea. What language? Using system() in C and Perl, I'm
 sure you could concoct something. Why would you want to do that?

  So if a user filled in a form and clicked a button in the program, the
  program would toy with the form a little, then send the form to PHP. Is
that
  possible using the CGI executible?

 I have no idea what you're talking about here, but if you're wanting
 to build some type of GUI based application you might as well either
 use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web
 server.

 -Brian
 --
  PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.



 --
 PHP General 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]




-- 
PHP General 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]




Re: [PHP] PHP without a webserver

2001-04-14 Thread Markus Fischer

On Sat, Apr 14, 2001 at 03:34:32PM -0500, Plutarck wrote : 
 The final layer is the scripting engine. In the script if a move_elevator()
[...]
 This would allow the vast majority of the real "content" of a game or
 application to be written in a scripting language, much like web apps are
 now. The script would run just as well on Linux as it would on windows.
[...]

This is not only true since now or since quake but also sicne the
early days of Sierra On-Line games / Lucasmfilm Games. All their
games were built on a particular Scripting Engine. For Lucasfilm,
this was SCUMM[tm] and for Sierra it was SCI (Sierra Creative
Interpreter).

This is why those games also run nowadays on Linux (see
http://freesci.linuxgames.com/ ).
Ok now this is hell Offtopic ;-)


But, yes, gtk+ rocks.

And, for me, I removed perl and also use now PHP as my day to day
scripting language. Its behaviour of hashes is much more
intuitive for me than perl's way (every used nested hashes ?
you're getting crazy doing so :). But, after all maybe i'm just
too dump for perl then. But hey its ok :) I've much joy and fun
working with PHP :-)


cheers,

Markus

-- 
PHP General 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]