Re: QUERY_STRING from command line

From: Date: Wed, 22 Sep 2004 07:28:20 +0000
Subject: Re: QUERY_STRING from command line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197523@lists.php.net to get a copy of this message
Rajesh Batchu wrote:
Hi, I am working on a php script which is accessed as below http://10.10.10.10/pageone.php?hellohowareyou in the pageone.php i am accessing the variable $_SERVER["QUERY_STRING" and i am getting the proper "hellohowareyou" as value. All these days i was accessing this over the browser. But now i need to POST to this page from command line. When i am usnig the below logic to post to this page, i am not getting any value in the $_SERVER["QUERY_STRING". that is because you are not using the query string. POST sends it's data in the body of the message and as a part of the url.
try $usepath="http://10.10.10.10/pageone.php?hellohowareyou"; and use GET instead of POST. been a while since I read the RFC but if you use 1.1 i think you have to send the host header. -- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.

« previous php.general (#197523) next »