Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31900 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9020 invoked by uid 1010); 24 Aug 2007 15:30:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8989 invoked from network); 24 Aug 2007 15:30:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2007 15:30:10 -0000 Authentication-Results: pb1.pair.com header.from=parasane@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=parasane@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.184 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: parasane@gmail.com X-Host-Fingerprint: 209.85.198.184 rv-out-0910.google.com Received: from [209.85.198.184] ([209.85.198.184:62901] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/B1-31863-089FEC64 for ; Fri, 24 Aug 2007 11:30:08 -0400 Received: by rv-out-0910.google.com with SMTP id k15so710678rvb for ; Fri, 24 Aug 2007 08:30:05 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=brydpl9KzVUaTgQv3KEsCN9L2SNy2edOk2Bp/+h2GIxzN2eFT6pohaqmNIIRa+RhB1x6A4Co25sTXLPxTsgtZE6C7WPYKLJTtxJJn+NRNw7G02ZxhEmXnG6rODINVGDXJqImF21Imz+jXV8EjmoOJuESEQr1RRotVtle7lAaHBE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ElmlU52KYFMocFnuZH0B0g11Btsl+ZyCrYk0Pg1WDdofbzheRmWXKVJsxqxO9jvgf+ZopnIDfcHfYy1FYZ/4Ioan1Pi5eKz5BotUPzPlx1VkGXh5WkDOChdJsXHVCu8TFTJeb2O6rEv9FwoD/4nfD3RSZCSLJZMrWqhOWpWukDM= Received: by 10.140.250.14 with SMTP id x14mr1458489rvh.1187969405636; Fri, 24 Aug 2007 08:30:05 -0700 (PDT) Received: by 10.140.178.10 with HTTP; Fri, 24 Aug 2007 08:30:05 -0700 (PDT) Message-ID: Date: Fri, 24 Aug 2007 11:30:05 -0400 To: "Steve Francisco" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] How to integrate PHP with my homegrown server From: parasane@gmail.com ("Daniel Brown") On 8/24/07, Steve Francisco wrote: [snip!] > 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 Steve, You'd need to transpose the $_GET variables from the request to $argv variables via the CLI. I don't know exactly how Java would handle it, but the PHP equivalent (though rather recursive and unnecessary, it's just here for demonstration purposes) would be: $v) { $data .= " ".$p."=".$v; } exec('`which php` '.$filename.$data,$ret); // This would work on Linux.... // exec('X:\path\to\php.exe '.$filename.$data,$ret); ?> Then, in the PHP script, if it wants $_GET variables, you simple reverse-transpose the variables like so: Of course, remember to sanitize all of your input properly. Someone else will probably provide a better example than this in some way, but in the interest of a quick reply, that will get you started. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Hey, PHP-General list.... 50% off for life on web hosting plans $10/mo. or more at http://www.pilotpig.net/. Use the coupon code phpgeneralaug07 Register domains for about $0.01 more than what it costs me at http://domains.pilotpig.net/.