Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31897 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98249 invoked by uid 1010); 24 Aug 2007 15:08:28 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 98233 invoked from network); 24 Aug 2007 15:08:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2007 15:08:28 -0000 X-Host-Fingerprint: 69.158.96.142 bas15-toronto12-1168007310.dsl.bell.ca Received: from [69.158.96.142] ([69.158.96.142:11327] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/10-31863-964FEC64 for ; Fri, 24 Aug 2007 11:08:27 -0400 Message-ID: To: internals@lists.php.net Date: Fri, 24 Aug 2007 11:08:19 -0400 User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 69.158.96.142 Subject: How to integrate PHP with my homegrown server From: cisco@gremlin.ca (Steve Francisco) Hi, as an experiment I have a simple Java based server that listens on port 80 and can serve files just fine. I'd like to extend it to support PHP but am looking for guidance on how to do that. Can someone point me to instructions? My first attempt was to just call the php.exe command line interface to launch the php interpreter, capture the html and send it back to the caller. That works well, but I can't seem to figure out how to deal with parameters. For example, if the url would be this on the server: http://some.server.com/mypage.php?parm1=Hello&parm2=Goodbye and in mypage.php I do something like this: $echo $_GET["parm1"]; then how do I test this via the PHP command line? If the command line doesn't have a way to cause $_GET to be populated, then what other way of invoking PHP could I use? -- Steve