www.digitalmars.com         C & C++   DMDScript  

DMDScript - Script and batch command.

reply "zhang li" <li stands.3322.org> writes:
Did anyone made HTTP server script or DOS batch by DMDscript?

HTTP server script accept any *.EXE / *.DLL to manager.

li
Nov 21 2002
parent reply "Walter" <walter digitalmars.com> writes:
I don't understand the question. -Walter

"zhang li" <li stands.3322.org> wrote in message
news:arimem$ejh$1 digitaldaemon.com...
 Did anyone made HTTP server script or DOS batch by DMDscript?

 HTTP server script accept any *.EXE / *.DLL to manager.

 li

Nov 21 2002
parent reply "zhang li" <li stands.3322.org> writes:
*.ASP, *.PL, *.JSP, *.PHP,.... is server script. they control stdin/stdout
as HTTP input/output.

for example, a simply "index.pl" script print a Html page to HTTP guest.
---------------
#!/usr/bin/perl -w


print "Content-type: text/html\n\n",<<HTML;

<html>
<head>
<title>Guest book</title>
</head>
<body>

<a href="..">Home</a>
</body>
</html>
HTML
---------------

index.pl request c:\perl\bin\perl.exe for windows.
or #!/usr/bin/perl -w for Linux/FreeBSD

Also use *.EXE, *.DLL, to manager HTTP server.
http://www.omnicron.ca/httpd/docs/index.html


li

"Walter" <walter digitalmars.com> 写入消息新闻
:arjqre$1o3b$1 digitaldaemon.com...
 I don't understand the question. -Walter

 "zhang li" <li stands.3322.org> wrote in message
 news:arimem$ejh$1 digitaldaemon.com...
 Did anyone made HTTP server script or DOS batch by DMDscript?

 HTTP server script accept any *.EXE / *.DLL to manager.

 li


Nov 21 2002
parent reply "Walter" <walter digitalmars.com> writes:
I just don't understand what you're asking. In any case, the dmdscript
engine can read from stdin and write to stdout, if that will work for your
application.

-Walter

"zhang li" <li stands.3322.org> wrote in message
news:ark7m1$262v$1 digitaldaemon.com...
 *.ASP, *.PL, *.JSP, *.PHP,.... is server script. they control stdin/stdout
 as HTTP input/output.

 for example, a simply "index.pl" script print a Html page to HTTP guest.
 ---------------
 #!/usr/bin/perl -w


 print "Content-type: text/html\n\n",<<HTML;

 <html>
 <head>
 <title>Guest book</title>
 </head>
 <body>

 <a href="..">Home</a>
 </body>
 </html>
 HTML
 ---------------

 index.pl request c:\perl\bin\perl.exe for windows.
 or #!/usr/bin/perl -w for Linux/FreeBSD

 Also use *.EXE, *.DLL, to manager HTTP server.
 http://www.omnicron.ca/httpd/docs/index.html


 li

 "Walter" <walter digitalmars.com> 写入消息新闻
 :arjqre$1o3b$1 digitaldaemon.com...
 I don't understand the question. -Walter

 "zhang li" <li stands.3322.org> wrote in message
 news:arimem$ejh$1 digitaldaemon.com...
 Did anyone made HTTP server script or DOS batch by DMDscript?

 HTTP server script accept any *.EXE / *.DLL to manager.

 li



Nov 22 2002
next sibling parent reply "zhang li" <li stands.3322.org> writes:
It has a little problem, the DSDscript print copyright info first, the info
also send to guest.

yet Internet Explorer need the first info from server.
print "Content-type: text/html\n\n",

so, the copyright info should print to stderr, will not be use as HTTP
output.


regard

li


"Walter" <walter digitalmars.com> 写入消息新闻
:arlntd$pf6$2 digitaldaemon.com...
 I just don't understand what you're asking. In any case, the dmdscript
 engine can read from stdin and write to stdout, if that will work for your
 application.

 -Walter

Nov 22 2002
parent reply "Walter" <walter digitalmars.com> writes:
So, dmdscript will work for you if the startup message is sent to stderr
rather than stdout, no other changes? -Walter

"zhang li" <li stands.3322.org> wrote in message
news:armvgp$23la$1 digitaldaemon.com...
 It has a little problem, the DSDscript print copyright info first, the

 also send to guest.

 yet Internet Explorer need the first info from server.
 print "Content-type: text/html\n\n",

 so, the copyright info should print to stderr, will not be use as HTTP
 output.


 regard

 li


 "Walter" <walter digitalmars.com> 写入消息新闻
 :arlntd$pf6$2 digitaldaemon.com...
 I just don't understand what you're asking. In any case, the dmdscript
 engine can read from stdin and write to stdout, if that will work for


 application.

 -Walter


Nov 23 2002
next sibling parent reply "zhang li" <li stands.3322.org> writes:
No fully adapt to HTTP manager.

Made a basis HTTP manager.
if it no make pointer error, will work at
http://127.0.0.1/cgi-bin/
directory.

For the post method of send a form, it need check environment
"HTTP_CONTENT_LENGTH=??"
to read data bytes from stdin.(add a string to numeric function)

try it, you will know the mean. :)

li

"Walter" <walter digitalmars.com> 写入消息新闻
:arps4e$2d99$1 digitaldaemon.com...
 So, dmdscript will work for you if the startup message is sent to stderr
 rather than stdout, no other changes? -Walter

 "zhang li" <li stands.3322.org> wrote in message
 news:armvgp$23la$1 digitaldaemon.com...
 It has a little problem, the DSDscript print copyright info first, the

 also send to guest.

 yet Internet Explorer need the first info from server.
 print "Content-type: text/html\n\n",

 so, the copyright info should print to stderr, will not be use as HTTP
 output.


 regard

 li


 "Walter" <walter digitalmars.com> 写入消息新闻
 :arlntd$pf6$2 digitaldaemon.com...
 I just don't understand what you're asking. In any case, the dmdscript
 engine can read from stdin and write to stdout, if that will work for


 application.

 -Walter



Nov 23 2002
parent reply "Walter" <walter digitalmars.com> writes:
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

So, it needs to be able to do a getenv()?
  "zhang li" <li stands.3322.org> wrote in message =
news:arpu83$2f8u$1 digitaldaemon.com...
  No fully adapt to HTTP manager.

  Made a basis HTTP manager.
  if it no make pointer error, will work at
  http://127.0.0.1/cgi-bin/
  directory.

  For the post method of send a form, it need check environment
  "HTTP_CONTENT_LENGTH=3D??"
  to read data bytes from stdin.(add a string to numeric function)

  try it, you will know the mean. :)

  li

  "Walter" <walter digitalmars.com> =D0=B4=C8=EB=CF=FB=CF=A2=D0=C2=CE=C5
  :arps4e$2d99$1 digitaldaemon.com...
  > So, dmdscript will work for you if the startup message is sent to =
stderr
  > rather than stdout, no other changes? -Walter
  >
  > "zhang li" <li stands.3322.org> wrote in message
  > news:armvgp$23la$1 digitaldaemon.com...
  > > It has a little problem, the DSDscript print copyright info first, =
the
  > info
  > > also send to guest.
  > >
  > > yet Internet Explorer need the first info from server.
  > > print "Content-type: text/html\n\n",
  > >
  > > so, the copyright info should print to stderr, will not be use as =
HTTP
  > > output.
  > >
  > >
  > > regard
  > >
  > > li
  > >
  > >
  > > "Walter" <walter digitalmars.com> =
=D0=B4=C8=EB=CF=FB=CF=A2=D0=C2=CE=C5
  > > :arlntd$pf6$2 digitaldaemon.com...
  > > > I just don't understand what you're asking. In any case, the =
dmdscript
  > > > engine can read from stdin and write to stdout, if that will =
work for
  > your
  > > > application.
  > > >
  > > > -Walter
  > > >
  > >
  > >
  >
  >
Nov 24 2002
parent "zhang li" <li stands.3322.org> writes:
"Walter" <walter digitalmars.com> ??????:arq7k1$2pns$1 digitaldaemon.com...
So, it needs to be able to do a getenv()?

|||||||||||
\*_*/
_\_/_

In a ideal HTTP manager programs, may want it does anything if passable. :)

Seem only C/C++ can does those things at computers. but a binary programs
looky unsafe in webmaster eyes. that is why use script as manager. even
script slowly but script are changeable. I don't know what is best. may
none.

in fact, PERL are most Lunix/Freebsd based part.
Sun Unix make own *.JSP (Java Script Program?).
Microsoft make own *.ASP (Active Server Page).
the PHP very likely PERL style.
I only installed Perl, read some PHP script.
if you have more document about Hypertext Transfer Protocol.
Please tell me. Thanks.

Li
Nov 24 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
"Walter" <walter digitalmars.com> wrote in message
news:arps4e$2d99$1 digitaldaemon.com...
 So, dmdscript will work for you if the startup message is sent to stderr
 rather than stdout, no other changes? -Walter

I've done this change now, and posted it. -Walter
Nov 30 2002
prev sibling parent "zhang li" <li stands.3322.org> writes:
maybe the Dscript can not work better than  a *.exe program.
..............

Final. it not adapt to a server manager.

li
Nov 22 2002